csniff - Command line interface to
csniff [options] dir(s)
-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)
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.
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?
You have a bunch of
DBIx::Class resultset objects, but you don't want to see the
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
csniff -n '^My::Resultset' -i '^DBIx' --png lib/My/ResultSet > rx.png
csniff -n '^My::Resultset' -i '^DBIx' --gif lib/My/ResultSet > rx.gif
Note that the
--png options require that you have the
dot executable installed and in your
dot is part of the GraphViz package (http://www.graphviz.org/).
Curtis "Ovid" Poe,
<ovid at cpan.org>
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.
You can find documentation for this module with the perldoc command.
You can also look for information at:
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.