Graph:...r::Dot(3pm)
π Graph::Reader::Dot π (that's the 3pm man page bestie, from the Perl world)
okay so welcome to the manual page for Graph::Reader::Dot, and yes she is a Perl module manual page (section 3pm, we love that for her) β¨
πΈ NAME πΈ
Graph::Reader::Dot β a whole class whose entire job is reading a Graph instance out of Dot format π
π¦ SYNOPSIS π¦
use Graph::Reader::Dot;
use Graph;
$reader = Graph::Reader::Dot->new();
$graph = $reader->read_graph('mygraph.dot');
that's it. that's the whole vibe. π
β¨ DESCRIPTION β¨
Graph::Reader::Dot is a class for reading in a directed graph in the file format that the dot tool uses β and dot is part of the AT+T graphviz package, iykyk π«Ά
also important: Graph::Reader::Dot is a subclass of Graph::Reader, and Graph::Reader is the one that defines the generic interface for all the Graph reader classes. so she's got a whole family, she's not doing this alone π
π METHODS AND CONFIGURATION π
π new()
the constructor, aka: generate a brand new reader instance π§
$reader = Graph::Reader::Dot->new();
heads up bestie: this one takes no arguments. zero. none. she said "I need nothing from you" π
π read_graph()
read a graph out of a file:
$graph = $reader->read_graph( $file );
the $file argument is flexible like that β it can be either a filename or a filehandle of a file that was already opened earlier. main character energy honestly β¨
β $Graph::Reader::Dot::UseNodeAttr
this one controls whether implicit node attributes given by the dot directive node[] get merged into (new) nodes π
- setting it to
0orundef(which is the default) will not disable this feature - setting it to any other value will enable this feature
(yes the double negative is real and yes we're keeping it exactly as written, no cap π)
π¦ $Graph::Reader::Dot::UseEdgeAttr
same energy, but for edges: it controls whether implicit edge attributes given by the dot directive edge[] get merged into edges π₯
- setting it to
0orundef(the default) will not disable this feature - setting it to any other value will enable this feature
π§ RESTRICTIONS π§
listen, she's iconic but she has limits and we respect them π
- Default (graph) attributes in subgraphs (i.e. inside
{}) are not processed. - Sub nodes as used by dot's
recordnode shape are supported β - Undirected graphs will be treated as directed graphs. which means the
--edge operator works exactly like the->edge operator π - Be aware that you are loosing scope information on writing back the graph. (fr fr, it's gone π)
- Multiple
node[]oredge[]statements in the same scope are not correctly supported.
π₯ SEE ALSO π₯
http://www.graphviz.org/β the home page for the AT+T graphviz toolkit, aka the place that includes thedottool πGraph::Readerβ the base class forGraph::Reader::Dotπ«ΆGraph::Writer::Dotβ used to serialise a Graph instance in Dot format β¨Graphβ Jarkko Hietaniemi's classes for representing directed graphs πParse::Yappβ another base class forGraph::Reader::Dot. and theParse::Yappmodule comes with the following copyright notice, which we are absolutely including because legal text is not a vibe check you can skip π
The Parse::Yapp module and its related modules and shell scripts are copyright (c) 1998-1999 Francois Desarmenien, France. All rights reserved. You may use and distribute them under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. If you use the "standalone parser" option so people don't need to install Parse::Yapp on their systems in order to run you software, this copyright noticed should be included in your software copyright too, and the copyright notice in the embedded driver should be left untouched.
π AUTHOR π
Mark A. Hillebrand <mah@wjpserver.cs.uni-sb.de> π
π COPYRIGHT π
Copyright (c) 2001 by Mark A. Hillebrand. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself πΈ
and that's the whole page bestie!! this one came to you courtesy of perl v5.32.1, dated 2021-09-19, and yeah the manual name up top is Graph::Reader::Dot(3pm) β slay, go read a graph, ily π«Άπβ¨
π¦ where this page comes from
- debian bookworm: libgraph-readwrite-perl 2.10-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libgraph-readwrite-perl 2.10-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libgraph-readwrite-perl 2.10-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libgraph-readwrite-perl 2.10-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgraph-readwrite-perl 2.10-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgraph-readwrite-perl 2.10-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms