5 More Discussions You Might Find Interesting
1. Solaris
What would you think is a reasonable useful lifespan for a Sunfire e2900. I'm not referring to it's performance capabilities as much as I'm referring to the hardware's ability to perform reliably. (2 Replies)
Discussion started by: DustinT
2 Replies
2. What is on Your Mind?
1.> Money
2.> Love
3.> If any other then specify.
I believe that money can buy everything. (5 Replies)
Discussion started by: R0H0N
5 Replies
3. UNIX for Advanced & Expert Users
Hello everyone, I was searching for locations where I can get End of Life information on multiple versions of Unix.
I have found some information which I list below, what I have not found or confirmed is where I can get the information for:
DEC Unix/OSF1 V4.0D
NCR Unix SVR4 MP-RAS Rel 3.02.... (2 Replies)
Discussion started by: robertmcol
2 Replies
4. AIX
Hello, has anyone heard of plans to end of life AIX 5.2? We are currently a 5.2 shop and are bringing in some new servers and are debating using 5.3 on the new boxes. Also, does anyone know of a site or document that show all the advantages of 5.3 over 5.2? Such as better jfs2 support etc. ... (3 Replies)
Discussion started by: zuessh
3 Replies
5. UNIX for Dummies Questions & Answers
Hi again. Sorry if it seems like I'm spamming the boards a bit, but I figured I might as well ask all the questions I need answers to at once, and hopefully at least get some.
I have installed Solaris 10 on a server. The default text editors are there (vi, ex, ed, maybe others, I know emacs is... (4 Replies)
Discussion started by: EugeneG
4 Replies
LEARN ABOUT DEBIAN
graph::easy::parser::vcg
Graph::Easy::Parser::VCG(3pm) User Contributed Perl Documentation Graph::Easy::Parser::VCG(3pm)
NAME
Graph::Easy::Parser::VCG - Parse VCG or GDL text into Graph::Easy
SYNOPSIS
# creating a graph from a textual description
use Graph::Easy::Parser::VCG;
my $parser = Graph::Easy::Parser::VCG->new();
my $graph = $parser->from_text(
"graph: {
" .
" node: { title: "Bonn" }
" .
" node: { title: "Berlin" }
" .
" edge: { sourcename: "Bonn" targetname: "Berlin" }
" .
"}
"
);
print $graph->as_ascii();
print $parser->from_file('mygraph.vcg')->as_ascii();
DESCRIPTION
"Graph::Easy::Parser::VCG" parses the text format from the VCG or GDL (Graph Description Language) use by tools like GCC and AiSee, and
constructs a "Graph::Easy" object from it.
The resulting object can then be used to layout and output the graph in various formats.
Output
The output will be a Graph::Easy object (unless overrriden with "use_class()"), see the documentation for Graph::Easy what you can do with
it.
Attributes
Attributes will be remapped to the proper Graph::Easy attribute names and values, as much as possible.
Anything else will be converted to custom attributes starting with "x-vcg-". So "dirty_edge_labels: yes" will become
"x-vcg-dirty_edge_labels: yes".
METHODS
"Graph::Easy::Parser::VCG" supports the same methods as its parent class "Graph::Easy::Parser":
new()
use Graph::Easy::Parser::VCG;
my $parser = Graph::Easy::Parser::VCG->new();
Creates a new parser object. There are two valid parameters:
debug
fatal_errors
Both take either a false or a true value.
my $parser = Graph::Easy::Parser::VCG->new( debug => 1 );
$parser->from_text('graph: { }');
reset()
$parser->reset();
Reset the status of the parser, clear errors etc. Automatically called when you call any of the "from_XXX()" methods below.
use_class()
$parser->use_class('node', 'Graph::Easy::MyNode');
Override the class to be used to constructs objects while parsing.
See Graph::Easy::Parser for further information.
from_text()
my $graph = $parser->from_text( $text );
Create a Graph::Easy object from the textual description in $text.
Returns undef for error, you can find out what the error was with error().
This method will reset any previous error, and thus the $parser object can be re-used to parse different texts by just calling
"from_text()" multiple times.
from_file()
my $graph = $parser->from_file( $filename );
my $graph = Graph::Easy::Parser::VCG->from_file( $filename );
Creates a Graph::Easy object from the textual description in the file $filename.
The second calling style will create a temporary parser object, parse the file and return the resulting "Graph::Easy" object.
Returns undef for error, you can find out what the error was with error() when using the first calling style.
error()
my $error = $parser->error();
Returns the last error, or the empty string if no error occured.
parse_error()
$parser->parse_error( $msg_nr, @params);
Sets an error message from a message number and replaces embedded templates like "##param1##" with the passed parameters.
CAVEATS
The parser has problems with the following things:
attributes Some attributes are not remapped properly to what Graph::Easy expects, thus losing information, either because Graph::Easy
doesn't support this feature yet, or because the mapping is incomplete.
comments Comments written in the source code itself are discarded. If you want to have comments on the graph, clusters, nodes or edges,
use the attribute "comment". These are correctly read in and stored, and then output into the different formats, too.
EXPORT
Exports nothing.
SEE ALSO
Graph::Easy, Graph::Write::VCG.
AUTHOR
Copyright (C) 2005 - 2008 by Tels <http://bloodgate.com>
See the LICENSE file for information.
perl v5.14.2 2011-12-23 Graph::Easy::Parser::VCG(3pm)