- COPYRIGHT AND LICENSE
Meta::Grapher::Moose - Produce graphs showing meta-information about classes and roles
From the shell:
foo@bar:~/package$ graph-meta.pl --package='My::Package::Name' --output='diagram.png'
Or from code:
my $grapher = Meta::Grapher::Moose->new( package => 'My::Package::Name', renderer => Meta::Grapher::Moose::Renderer::Plantuml->new( output => 'diagram.png', ), ); $grapher->run;
STOP: The most common usage for this module is to use the command line graph-meta.pl program. You should read the documentation for graph-meta.pl to see how that works.
This module allows you to create graphs of your Moose classes showing a directed graph of the parent classes and roles that your class consumes recursively. In short, it can visually answer the questions like "Why did I end up consuming that role" and, with the right renderer backend, "Where did that method come from?"
With the GraphViz renderer (no methods/attributes): http://st.aticpan.org/source/DROLSKY/Meta-Grapher-Moose-1.03/examples/output/graphviz/example.png
And with the PlantUML renderer: http://st.aticpan.org/source/DROLSKY/Meta-Grapher-Moose-1.03/examples/output/plantuml/example.png
This class accepts the following attributes:
The name of package that we should render a graph for.
Since every Moose class and role normally has a
meta() method it is omitted from every class for brevity; Enabling this option causes it to be rendered.
new() constructor is omitted from every class for brevity; Enabling this option causes it to be rendered.
DESTROY() method that Moose installs is omitted from every class for brevity; Enabling this option causes it to be rendered.
The Moose::Object base class is normally omitted from the diagram for brevity. Enabling this option causes it be rendered.
The renderer instance you want to use to create the graph.
Something that consumes Meta::Grapher::Moose::Role::Renderer. Required, should be passed as the
renderer argument (without the leading underscore.)
This class provides the following methods:
Builds the graph from the source code and tells the renderer to render it.
I am also usually active on IRC as 'drolsky' on
If you'd like to thank me for the work I've done on this module, please consider making a "donation" to me via PayPal. I spend a lot of free time creating free software, and would appreciate any support you'd care to offer.
Please note that I am not suggesting that you must do this in order for me to continue working on this particular software. I will continue to do so, inasmuch as I have in the past, for as long as it interests me.
Similarly, a donation made in this way will probably not make me work on this software much more, unless I get so many donations that I can consider working on free software full time (let's all have a chuckle at that together).
To donate, log into PayPal and send money to firstname.lastname@example.org, or use the button at http://www.urth.org/~autarch/fs-donation.html.
Dave Rolsky <email@example.com>
Mark Fowler <firstname.lastname@example.org>
This software is Copyright (c) 2016 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)