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 0 or undef (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 0 or undef (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 record node 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[] or edge[] 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 the dot tool 🌈
  • Graph::Reader β€” the base class for Graph::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 for Graph::Reader::Dot. and the Parse::Yapp module 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 (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