Pod::Generated - Generate POD documentation during "make" time
use Pod::Generated 'add_doc'; my $pkg = __PACKAGE__; add_doc($pkg, CODE => 'new', purpose => 'A constructor.'); add_doc($pkg, SCALAR => 'count', purpose => 'Number of flurbles.');
This module provides support for generating POD documentation for your modules during make time. It does not itself generate the documentation - the combination of Module::Install::Template and Template::Plugin::PodGenerated does that.
make
Also see Pod::Generated::Attributes.
Modules that generate methods - such as Class::Accessor - might want to use this module. Class::Accessor::Complex, Class::Accessor::Constructor and Class::Accessor::FactoryTyped do support generated documentation, or will do so shortly.
This modules exports two functions on request:
add_doc
add_doc($pkg, $glob_type, $symbol_name, $doc_type, $doc);
Adds documentation. Takes as arguments the package for which to add documentation, a glob type (CODE, SCALAR, ARRAY, HASH), the symbol name for which to add documentation (i.e., the subroutine name or variable name), the documentation type (e.g., purpose, example) and the documentation string.
CODE
SCALAR
ARRAY
HASH
purpose
example
The symbol name alone is insufficient to determine what is being documented - does new refer to the subroutine new() or any of the variables $new, C@new> or %new? Therefore you also need to pass the glob type.
new
new()
$new
%new
The documentation type is freely definable, but the code that actually generates the documentation (for example, Template::Plugin::PodGenerated) needs to understand these documentation types.
Documentation is stored in a nested hash.
doc
Returns the documentation hash. This can be used by modules that actually generate the documentation to inspect which documentation has been defined.
If you talk about this module in blogs, on delicious.com or anywhere else, please use the podgenerated tag.
podgenerated
No bugs have been reported.
Please report any bugs or feature requests to bug-pod-generated@rt.cpan.org, or through the web interface at http://rt.cpan.org.
bug-pod-generated@rt.cpan.org
See perlmodinstall for information and options on installing Perl modules.
The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a CPAN site near you. Or see http://search.cpan.org/dist/Pod-Generated/.
Marcel Grünauer, <marcel@cpan.org>
<marcel@cpan.org>
Copyright 2007-2009 by Marcel Grünauer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Pod::Generated, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pod::Generated
CPAN shell
perl -MCPAN -e shell install Pod::Generated
For more information on module installation, please visit the detailed CPAN module installation guide.