The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MooseX::Documenter - class for getting Moose documentation for your Moose classes

SYNOPSIS

Using the library:

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

Configuring the path to where Moose::Object resides:

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

Getting what local attributes exist for your Moose class:

  my $local_attributes = $doc->local_attributes;

Getting what inherited attributes exist for your Moose class:

  my $inherited_attributes = $doc->inherited_attributes;

Getting what local methods exist for your Moose class:

  my $local_methods = $doc->local_methods;

Getting what inherited methods exist for your Moose class:

  my $inherited_methods = $doc->inherited_methods;

Getting what parents exist for your Moose class:

  my $parents = $doc->class_parents;

Getting what roles exist for your Moose class:

  my $roles = $doc->roles;

DESCRIPTION

This module provides a simple way to autodocument your Moose modules. While PPI is good for normal perl class and objects, it does not work for Moose.

This module is intended to help make documentation from your Moose classes. It will not only document what your Moose classes do but also make it easy to see the relationships between your various Moose classes.

Methods

new

Params: '/path/to/Moose/classes/','module::name::of::class' Returns a MooseX::Documenter for the specified moose class. Takes a path to add to the perl lib path for the system to find your moose class and the name of the moose class.

setmooselib

Params: '/path/to/lib/where/Moose/Object/is/' Returns the path that was set. The path you give should be the perl lib path you'de need to give the system to find the Moose::Object class. This documenter needs this to document what is in Moose::Object for you as all your non-role Moose items should inherit from Moose::Object.

local_attributes

Returns undef or a hash ref of attributes. Each attribute name is the key and each value is another hash ref of information on the individual attribute. This individual attribute hash ref will have is=>is_value, isa=>isa_value, modifiers=>comma_seperated_list. This comma seperated list may contain: required, lazy, lazy_build, coerce, weak_ref, trigger, handles.

inherited_attributes

Returns undef or a hash ref of inherited attributes. Each parent object name is the key and each value is a hash ref identical to what the local_attributes function returns.

local_methods

Returns undef or a hash ref of local methods. Each method name is the key and each value is the source code of the local method.

inherited_methods

Returns undef or a hash ref of inherited methods. Each parent object name is the key and each value is a hash ref idential to what the local_methods function returns.

class_parents

Returns undef or an array ref of all parent names in your Moose class.

roles

Returns undef or an array ref of all roles in your Moose class.

SEE ALSO

  You should review the Moose Documentation on cpan on rules for your Moose classes.  This module assumes that Moose syntax and other rules are followed.  For the most part, if its not valid Moose, it'll blow up.

AUTHOR

David Bury, <dsbike@gmail.com<gt>

COPYRIGHT AND LICENSE

Copyright (C) 2009 by David Bury

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.