NAME
pmusage - generate usage graph for a perl module
SYNOPSIS
pmusage [OPTIONS] class
DESCRIPTION
pmusage creates usage graphs for Perl modules. The graph is constructed as a directed graph, and output in one of the following formats:
- Dot
-
The file format used by dot, which is part of the AT&T graphviz package.
- VCG
-
The file format used by vcg, a tool originally created for visualising compiler graphs.
- daVinci
-
The file format used by daVinci, a tool for visualising graphs, and interactively creating them.
- XML
-
A simple XML file format used for representing directed graphs created using the perl Graph class.
The following example shows how you might generate and view the usage graph for the Net::FTP
module:
% pmusage -format dot Net::FTP
% dot -Tps -o usage.ps usage.dot
% ghostview usage.ps
By default the graph is written to a file called usage, with an extension that identifies the format. You can specify the output filename explicitly using the -o switch:
% pmusage -format vcg -o ftp.vcg Net::FTP
% xvcg ftp.vcg
pmusage will ignore pragmas (eg strict
and vars
) unless you use the -pragmas option:
% pmusage -pragmas -format dot GIFgraph
OPTIONS
- -format id
-
The file format for the usage graph.
- -o filename
-
The file to write the graph to. Defaults to usage.format.
- -pragmas
-
Pragmas, like
strict
, should be included in the graph. - -help
-
Display a short help message including command-line options.
- -doc
-
Display the full documentation for pmusage.
- -version
-
Display the version of pmusage.
- -verbose
-
Display verbose information as pmusage runs.
- -debug
-
Display debugging information as pmusage runs.
KNOWN BUGS AND LIMITATIONS
pmusage uses simple regex matching to find what modules are used by a specific module. This could easily be confused.
Doesn't currently generate an inheritance graph, which would also be handy. I plan to fix that soon.
The table of supported formats is currently hardcoded in this script. We could dynamically create the table based on what
Graph::Writer::
classes you have installed.
SEE ALSO
- Graph-ReadWrite
-
A collection of classes for reading and writing directed graphs in various file formats. Available from CPAN.
- Graph
-
The class used to represent the directed graph. Available from CPAN.
- http://www.graphviz.org/
-
The home page for the AT&T graphviz toolkit, which includes the dot tool.
- http://www.cs.uni-sb.de/RW/users/sander/html/gsvcg1.html
-
The home page for VCG, a tool for visualising compiler graphs.
VERSION
$Revision: 1.2 $
AUTHOR
Neil Bowers <neilb@cre.canon.co.uk>
COPYRIGHT
Copyright (C) 2001 Canon Research Centre Europe. All rights reserved.
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.