1GraphViz::Data::GrapherU(s3e)r Contributed Perl DocumentaGtriaopnhViz::Data::Grapher(3)
2
3
4

NAME

6       GraphViz::Data::Grapher - Visualise data structures as a graph
7

SYNOPSIS

9         use GraphViz::Data::Grapher;
10
11         my $graph = GraphViz::Data::Grapher->new($structure);
12         print $graph->as_png;
13

DESCRIPTION

15       This module makes it easy to visualise Perl data structures. Data
16       structures can grow quite large and it can be hard to understand the
17       quite how the structure fits together.
18
19       Data::Dumper can help by representing the structure as a text heirar‐
20       chy, but GraphViz::Data::Grapher goes a step further and visualises the
21       structure by drawing a graph which represents the data structure.
22
23       Arrays are represented by records. Scalars are represented by them‐
24       selves. Array references are represented by a '@' symbol, which is
25       linked to the array. Hash references are represented by a '%' symbol,
26       which is linked to an array of keys, which each link to their value.
27       Object references are represented by 'Object', which then links to the
28       type of the object. Undef is represented by 'undef'.
29

METHODS

31       new
32
33       This is the constructor. It takes a list, which is the data structure
34       to be visualised. A GraphViz object is returned.
35
36         my $graph = GraphViz::Data::Grapher->new([3, 4, 5], "Hello");
37
38       as_*
39
40       The data structure can be visualised in a number of different graphical
41       formats. Methods include as_ps, as_hpgl, as_pcl, as_mif, as_pic, as_gd,
42       as_gd2, as_gif, as_jpeg, as_png, as_wbmp, as_ismap, as_imap, as_vrml,
43       as_vtx, as_mp, as_fig, as_svg. See the GraphViz documentation for more
44       information. The two most common methods are:
45
46         # Print out a PNG-format file
47         print $graph->as_png;
48
49         # Print out a PostScript-format file
50         print $graph->as_ps;
51

AUTHOR

53       Leon Brocard <acme@astray.com>
54
56       Copyright (C) 2000-1, Leon Brocard
57
58       This module is free software; you can redistribute it or modify it
59       under the same terms as Perl itself.
60
61
62
63perl v5.8.8                       2004-12-02        GraphViz::Data::Grapher(3)
Impressum