|
NAMEDevel::Diagram - Discover the classes of an arbitrary suite of Perl modulesSYNOPSISuse Devel::Diagram; # Discover classes of a package anchored by a single Perl module. # $diagram = new Devel::Diagram('CGI'); # Discover classes of a package anchored by a collection of modules in a folder. # use Devel::Diagram; $diagram = new Devel::Diagram('HTML/'); # Render the result in your desired format. # print $diagram->Render('UXF20'); # Render the result, then transform it via XSL. # print $diagram->Render('UXF20', 'xsl:uxf20toHtml'); DESCRIPTIONDevel::Diagram scans the given Perl modules attempting to discover the class structure. It produces a hash table that can be converted to XML (or other formats) via Render().An XSL stylesheet is included that converts the XML class diagram into HTML. See "eg/Diagram.pl" for a full example of use. METHODSThe few methods you need to activate Devel::Diagram.new( $moduleSpecifications ) Here you name the Perl module (or suite) you want to process. Enter the string you would specify in a 'use' or 'require' statement for this module. You may enter as many module specifications as you like, separated by commas. Render( $renderType [, $transformType] ) Renders the class diagram in the given format. Currently the only format that is recognized is 'UXF20'. These can be extended easily by creating a new "Devel::Diagram::Render::<yourName"> module. Render() optionally takes a second parameter specifying a transformation on the rendered format, presumably resulting in a new format. For instance, Render('UXF20', 'xsl:uxf20toHtml') renders the class diagram as UXF20, then runs it through the XSL transform named "uxf20toHtml.xsl". "Render()" expects to find the XSL stylesheet in the "xsl" folder of "Devel::Diagram". You need "XML::XSLT::Wrapper" and an appropriate XSL transform engine to make this work. Any warnings or errors in the rendering process can be found by investigating $@ on return. TODOThese are some of the things I think can be done to extend Devel::Diagram.
AUTHOR"Devel::Diagram" is written and maintained by Glenn Wood, http://search.cpan.org/search?mode=author&query=GLENNWOOD.COPYRIGHTCopyright (c) 2003 Glenn Wood All rights reserved.This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |