MooseX::Documenter

Moosex::Documenter

Today we will go through what it is and what can be done with it.

We will use a perl parser and class introspection class to automatically get information in Moose object classes in a directory to automatically output webpages of documentation on them and graphical UML diagrams of the overall structure.

---

Simple Usage

use MooseX::Documenter;

my $doc = MooseX::Documenter->new('/path/to/Moose/classes/','module::name::of::class');

$doc->setmooselib('/path/to/lib/where/Moose/Object/is/');

my $local_attributes = $doc->local_attributes;

my $inherited_attributes = $doc->inherited_attributes;

my $local_methods = $doc->local_methods;

my $inherited_methods = $doc->inherited_methods;

my $parents = $doc->class_parents;

my $roles = $doc->roles;

---

So What?

We can now automatically find what composes a Moose Object or Role.

Avoid poring over source code for simple information on a class or many classes.

We can make simple program to automatically generate lots of documentation.

---

Example of Website

Can iterate over a directory of moose class...

---

Example of a website

At a glance can tell overall components of class

---

Example of a Website

Inherited attributes and locations obvious

---

Example of a Website

Inherited method and locations obvious

---

Example of a Website

Attribute types, access, and other info shown

---

Example of a Website

Example of class with local methods

---

Example of a Website

Method source code easy to see

---

Automation of Docs = GOOD

This past example shows one powerfull way to use MooseX::Documenter.

It makes writing your own website very simple.

One can get a good idea of what exists in each class while avoiding source.

Provides good start to understanding code.

---

Something else to automate

The next example goes from giving a good view of each object

To an overview of the system.

Uses Autodia cpan module.

---

Automatically made UML diagram

---

Middle top

---

Middle center

---

Middle bot

---

Left top

---

Left bot

---

Right top

---

Right Bot

---

Zoom View

--

MooseX::Documenter

Lets you automatically Documenter you moose classes.

Lets you easily use results to program what you want

Makes life easer in documenting code or at least providing a place to start.

Documentation Rocks!

Questions? I can show source code if time...