• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

ChangesH A D01-Jan-20011.2 KiB3933

Graph.pmH A D01-Jan-200132.2 KiB1,134869

MANIFESTH A D01-Aug-1998151 76

Makefile.PLH A D18-Jun-1997318 107

READMEH A D01-Jan-20012.9 KiB8664

test.plH A D18-Jun-1997653 215

README

1B::Graph, version 0.51
2
3Copyright (C) 1997, 1998, 2000 Stephen McCamant. All rights reserved.
4This program is free software; you can redistribute and/or modify
5it under the same terms as Perl itself.
6
7Module list information:
8B::Graph	bdpr	Perl Compiler backend to diagram OP trees
9
10This module is a layer between the perl-internals-examining parts of
11Malcolm Beattie's perl compiler (the B::* classes) and your favorite
12graph layout tool (currently Dot and VGC are supported, but adding
13others would be easy). It examines the internal structures that perl
14builds to represent your code (OPs and SVs), and generates
15specifications for multicolored boxes and arrows to represent them.
16
17New in this version:
18 - Turned off fileGVs in versions that don't have them
19 - Minor doc cleanups
20 - Changed my email address
21
22This version should work with perl 5.6.0.
23
24Other things you need:
25
26* perl 5.005 or later
27
28(Earlier versions of perl will work to various extents with old alpha
29versions of the compiler, but the version in 5.005 has several fixes,
30so it is recommended.)
31
32* Visualization of Compiler Graphs (`the VGC tool')
33http://www.cs.uni-sb.de/RW/users/sander/html/gsvcg1.htm
34     OR
35The graph visualization package from from AT&T (contains Dot)
36http://www.research.att.com/sw/tools/graphviz/
37(VCG has Windows and X11 interfaces, and is good for interactive
38viewing; Dot is a batch program that generates good PostScript, so
39you'll need either a printer or an previewer)
40
41* A basic understanding of how perl's internals work (see perlguts(1))
42     OR
43A willingness to stare at complicated-looking diagrams, most of which
44you don't understand
45(Seriously, this module can be a good tool for learning about how perl
46works inside -- for instance, its output is a lot more intutive that
47`perl -Dx''s, IMHO)
48
49BUILDING
50
51Just like any other module:
52% perl Makefile.PL
53% make
54% make install
55
56(`make test' currently doesn't do anything interesting. Also, with
575.005 it may fail to find the `Perl_byterun' symbol, but B::Graph will
58still run fine. If you just want to test whether B::Graph works on
59your platform (hello CPAN testers!), just run one of the examples
60below and check that the output doesn't look like an error message.)
61
62EXAMPLE
63
64(Add `-Mblib' if you haven't done `make install')
65
66% perl -MO=Graph,-vcg -e '$a = $b + $c' >graph.vcg
67% xvcg graph.vcg
68    OR
69% perl -MO=Graph,-dot -e '$a = $b + $c' | dot -Tps >graph.ps
70% gv graph.ps (or your favorite PostScript previewer)
71
72(depending on your shell, you might be able to do everyting in one
73line -- in zsh, say
74% xvcg =(perl -MO=Graph,-vcg -e '...')
75)
76
77You may notice that this is the same example used in perlguts (the
78section titled `code tree'). A comparison to the ASCII art there will
79give you an idea of what `slightly more complicated' means.
80
81For more detailed information, see the POD at the end of Graph.pm.
82
83
84Send questions, bug reports, and feature requests to me, Stephen
85McCamant <smcc@CSUA.Berkeley.EDU>.
86