Autodia::Diagram(3pm)
π Autodia::Diagram β the Perl manual page, but make it cute β¨
okay bestie, gather round π«Ά this is Autodia::Diagram(3pm), a page from the User Contributed Perl Documentation, and it's literally about a class that holds a whole lil collection of objects representing parts of a Dia Diagram. it's giving architecture-girlboss energy and we're obsessed. π
πΈ NAME πΈ
Autodia::Diagram β a class to hold a collection of objects representing parts of a Dia Diagram. yes that's the whole job description and she does it flawlessly, no cap. β¨
π¦ SYNOPSIS π¦
use Autodia::Diagram;
my $Diagram = Autodia::Diagram->new;
π Description π
so Diagram is an object that contains a collection of diagram elements π β plus the logic to generate the diagram layout, and to output the diagram itself in Dia's XML format using template toolkit. she contains multitudes fr fr. π
β¨ METHODS β¨
π Class Methods
newβ the constructor method π creates and returns an unpopulated diagram object. blank slate, main character origin story, no cap.
π Object methods
to get a collection of objects of a certain type, you use the method of the same name. like, $Diagram->Classes() returns an array of 'class' objects. it's literally that simple bestie. π
the methods available are Classes(), Components(), Superclasses(), Inheritances(), Relations(), and Dependencies() β these are all called in the template to get the collections of objects to loop through. iconic behaviour honestly. π₯
to add an object to the diagram, you call the add_<object type> method β for example $Diagram->add_class($class_name) β passing the name of the object in the case of Class, Superclass and Component, but not Inheritance or Dependency, which have their names generated automagically. β¨ (yes, automagically. we don't make the rules.)
β οΈ important, don't skip this: objects are not removed. they can only be superseded by another object. Component can be superseded by Superclass, which can be superseded by Class. and this is handled by the object itself, not by the diagram. so the diagram is not the one doing the glow-up, the object is. π
π§ Accessing and manipulating the Diagram
- elements are added to the Diagram through the
add_<elementname>method β i.e.add_classes(). π - collections of elements are retrieved through the
<elementname>method β i.e.Classes(). πΈ - the diagram is laid out and output to a file using the
export_xml()method. π
π See Also
AutodiaAutodia::Diagram::ObjectAutodia::Diagram::ClassAutodia::Diagram::SuperclassAutodia::Diagram::ComponentAutodia::Diagram::InheritanceAutodia::Diagram::RelationAutodia::Diagram::Dependancy
(the whole friend group, all linked up π«Ά)
π AUTHOR π
Aaron Trevena, <aaron.trevena@gmail.com>
π COPYRIGHT AND LICENSE π
Copyright (C) 2004 by Aaron Trevena
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.1 or, at your option, any later version of Perl 5 you may have available.
and that's the whole page bestie, we ate and left no crumbs ππ
this was perl v5.36.0, dated 2022-11-02, and it lives under the name Autodia::Diagram(3pm). mwah, go build something pretty β¨ππ¦
π¦ where this page comes from
- debian bookworm: autodia 2.14-5 Β· GPL-2.0-only
- debian trixie: autodia 2.14-5 Β· GPL-2.0-only
- ubuntu noble: autodia 2.14-5 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms