1Graph::Easy::As_vcg(3)User Contributed Perl DocumentationGraph::Easy::As_vcg(3)
2
3
4
6 Graph::Easy::As_vcg - Generate VCG/GDL text from Graph::Easy object
7
9 use Graph::Easy;
10
11 my $graph = Graph::Easy->new();
12
13 my $bonn = Graph::Easy::Node->new(
14 name => 'Bonn',
15 );
16 my $berlin = Graph::Easy::Node->new(
17 name => 'Berlin',
18 );
19
20 $graph->add_edge ($bonn, $berlin);
21
22 print $graph->as_vcg();
23
24 This prints something like this:
25
26 graph: {
27 node: { title: "Bonn" }
28 node: { title: "Berlin" }
29 edge: { sourcename: "Bonn" targetname: "Berlin" }
30 }
31
33 "Graph::Easy::As_vcg" contains just the code for converting a
34 Graph::Easy object to either a VCG or GDL textual description.
35
36 Note that the generated format is compatible to "GDL" aka Graph
37 Description Language.
38
40 Exports nothing.
41
43 Graph::Easy, <http://rw4.cs.uni-sb.de/~sander/html/gsvcg1.html>.
44
46 Copyright (C) 2004-2008 by Tels <http://bloodgate.com>
47
48 See the LICENSE file for information.
49
50
51
52perl v5.36.0 2023-02-02 Graph::Easy::As_vcg(3)