Graph:...aVinci(3pm)
π Graph::Writer::daVinci β bestie edition π
okay so real quick: this is Graph::Writer::daVinci(3pm), a page from the User Contributed Perl Documentation collection. sit down, hydrate, let's talk directed graphs and daVinci files π
β¨ NAME β¨
Graph::Writer::daVinci β write out a directed graph in daVinci format. that's it, that's the whole job, and she does it flawlessly π
π¦ SYNOPSIS π¦
use Graph;
use Graph::Writer::daVinci;
$graph = Graph->new();
# add edges and nodes to the graph
$writer = Graph::Writer::daVinci->new();
$writer->write_graph($graph, 'mygraph.davinci');
look at that. four lines of setup and you're out here living your best graph-writing life. iconic, honestly π«Ά
πΈ DESCRIPTION πΈ
so Graph::Writer::daVinci is a class. it's a class whose entire personality is writing out a directed graph in the file format that the daVinci tool uses. that's the vibe. that's the assignment.
and here's the thing, bestie, the graph you hand it must be an instance of the Graph class. and Graph isn't just one class, no ma'am β it's actually a set of classes, and they were developed by Jarkko Hietaniemi. we stan a modular king π
π METHODS π
π new()
constructor!! generate a brand-new writer instance, fresh out the box:
$writer = Graph::Writer::daVinci->new();
and here's the tea: this doesn't take any arguments. none. zero. don't even try it. just vibes β¨
π write_graph()
this is the main character method fr fr. write a specific graph out to a named file:
$writer->write_graph($graph, $file);
and about that $file argument β she's flexible, okay?? it can either be a filename, or a filehandle for a file you already opened. your choice, no judgement, we love options π
π SEE ALSO π
- http://www-b-novative.de/ β wait, no, let me say it right, the actual link is http://www.b-novative.de/ and it's the home page for the daVinci. go say hi π¦
Graphβ Jarkko Hietaniemi's modules for representing directed graphs, and you can grab them from CPAN undermodules/by-module/Graph/. go get 'em β- Algorithms in Perl β the O'Reilly book, and yes it has a chapter on directed graphs, and yes that chapter is based around Jarkko's modules. read it, it's giving academic baddie π
Graph::Writerβ the base-class forGraph::Writer::daVinci. she's the momager. respect her π
π REPOSITORY π
<https://github.com/neilb/Graph-ReadWrite>
go ahead and star it. you know you want to β
π AUTHOR π
Neil Bowers <neil@bowers.com> π
π COPYRIGHT π
Copyright (c) 2001-2012, Neil Bowers. All rights reserved. Copyright (c) 2001, Canon Research Centre Europe. All rights reserved.
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
(translation: it's free, it's open, use it, remix it, just keep the same Perl terms and we're all good π«Ά)
aaaand that's the whole page, bestie!! no cap, you now know everything this manpage knows π§
and real quick, the sign-off energy: this page came from perl v5.32.1 and was last dated 2021-09-19. bye babes, go write some graphs πβ¨
π¦ 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