B::Tree - Simplified version of B::Graph for demonstration
perl -MO=Tree program | dot -Tps > tree.ps
This is a very cut-down version of B::Graph; it generates minimalist tree graphs of the op tree of a Perl program, merely connecting the op nodes and labelling each node with the type of op.
B::Graph
It was written as an example of how to write compiler modules for "Professional Perl", but I've found it extremely useful for creating simple op tree graphs for use in presentations on Perl internals.
It requires the CPAN GraphViz module and the GraphViz package from http://www.research.att.com/sw/tools/graphviz/. It takes no options.
GraphViz
http://www.research.att.com/sw/tools/graphviz/
Simon Cozens, simon@cpan.org
simon@cpan.org
GraphViz, B::Graph
To install B::Tree, copy and paste the appropriate command in to your terminal.
cpanm
cpanm B::Tree
CPAN shell
perl -MCPAN -e shell install B::Tree
For more information on module installation, please visit the detailed CPAN module installation guide.