Neil Bowers > Class-Sniff-0.10 > csniff

Download:
Class-Sniff-0.10.tar.gz

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Source  

NAME ^

csniff - Command line interface to Class::Sniff graphs.

USAGE ^

 csniff [options] dir(s)

OPTIONS ^

Boolean options:

 -v,  --verbose     Print what classes are being loaded
 -p,  --png         Output as png (requires 'dot' executable)
 -g,  --gif         Output as gif (requires 'dot' executable)
 -t,  --text        Output as text (large graphs may not render well)

Options that take arguments:

 -n,  --namespace   Perl regex to match desired namespaces
 -i,  --ignore      Perl regex to exclude namespaces
 -I,                Use this path with "use lib". Can be set multiple
                    times for more than one path.
 -o   --output      Graph format as understood by 'dot' (eg. svg, dia)

DESCRIPTION ^

Given one or more directories, attempts to render a Class::Sniff graph for all modules found in them. This may be very slow. Be patient. Output is sent to STDOUT, so redirect it where you will.

If no namespace argument is passed, it will attempt to graph every namespace. Because some of the modules Class::Sniff must load are fairly heavyweight, you will get plenty of modules showing up in the graph which you didn't expect. And it will be slow. Did I mention that already?

EXAMPLES ^

Graph your DBIx::Class resultset objects

You have a bunch of DBIx::Class resultset objects, but you don't want to see the DBIx::Class hierarchy.

As text graph:

 csniff --namespace '^My::ResultSet' --ignore '^DBIx' \
    lib/My/ResultSet > rs.txt

As text graph with short options:

 csniff -n '^My::Resultset' -i '^DBIx' lib/My/ResultSet > rx.txt

As PNG:

 csniff -n '^My::Resultset' -i '^DBIx' --png lib/My/ResultSet > rx.png

As Gif:

 csniff -n '^My::Resultset' -i '^DBIx' --gif lib/My/ResultSet > rx.gif

Note that the --gif and --png options require that you have the dot executable installed and in your PATH. dot is part of the GraphViz package (http://www.graphviz.org/).

AUTHOR ^

Curtis "Ovid" Poe, <ovid at cpan.org>

BUGS ^

Please report any bugs or feature requests to bug-class-sniff at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Class-Sniff. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Class::Sniff

You can also look for information at:

ACKNOWLEDGEMENTS ^

COPYRIGHT & LICENSE ^

Copyright 2009 Curtis "Ovid" Poe, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: