Autodia::Diagram(3pm)

πŸ“¦
version 2.14 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble

πŸ’– 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

  • Autodia
  • Autodia::Diagram::Object
  • Autodia::Diagram::Class
  • Autodia::Diagram::Superclass
  • Autodia::Diagram::Component
  • Autodia::Diagram::Inheritance
  • Autodia::Diagram::Relation
  • Autodia::Diagram::Dependancy

(the whole friend group, all linked up 🫢)


πŸ’œ AUTHOR πŸ’œ

Aaron Trevena, <aaron.trevena@gmail.com>


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