Herkum has asked for the wisdom of the Perl Monks concerning the following question:

I have several modules that are the base for other modules. What I would like to do is generate POD documentation that compiles the subroutines/method sections for the SUPER classes with the modules that inherit it. This way I don't have to refer to different modules to look up documentation for inherited methods.

package FOO; =pod =head1 SUBROUTINES/METHODS =head2 foo_call() =cut package BAR; #### In another file of course... ################################################ use base 'FOO'; =pod =head1 SUBROUTINES/METHODS =head2 bar_call() =cut ############################################## # Generated pod has... =head1 SUBROUTINES/METHODS =head2 foo_call() =head2 bar_call()

I looked around and most of the POD modules out there refer to converting POD to another format and some stuff for making the POD into an object (so the tools are there to write my own). I was hoping that someone knew of a specific module that already did this. Any suggestions?

Replies are listed 'Best First'.
Re: Compiled POD Documentation
by saintmike (Vicar) on Apr 08, 2006 at 20:25 UTC
    I'm not aware of a CPAN module that does what you want, but if you put something like
    =for BASE_METHODS_START ... =for BASE_METHODS_END
    into the POD of the subclass and then use a script that parses the base class(es), extracts the method POD pieces from them and then plunks them down in the subclass POD with a substitution like
    $data =~ s/=for\sBASE_METHODS_START.*? =for\sBASE_METHODS_END /=for\sBASE_METHODS_START\n\n$otherpod\n\n=for BASE_METHODS_END/xgs +;
    then you should be good to go.

    This script in the distribution of Perl::Configure uses this trick to add a dynamically generated ascii table into the main POD.

Re: Compiled POD Documentation
by jplindstrom (Monsignor) on Apr 10, 2006 at 12:35 UTC
    Check out OODoc, it may be similar to what you want.

    /J