documentation generator? web-enabled perldoc? covers a fair bit of ground. The perldoc project looks like it died but might help you out.

Before doing anything I would start by putting it all under CVS (Short tutorial) With CVS you get a nice cohesive location for backup etc as well as all the other benefits. Then I would simply use Pod and refactor as I went. POD::HTML will give you some nice docs and you can use CVS to rollback any misfactors.

A significant problem with autodoc generation is the parsing stage. B::Xref does a reasonable job if you were looking to roll your own.

perl -MO=Xref script.pl 2>errs 1>output

Unpatched it creates a ream of warnings about unit vars, thus the 2>errs. If you examine the output you will see info like this. I ran it on UNIVERSAL.pm as this is a nice short 10 lines, the more complex the code, the more output you get.

$ head UNIVERSAL.pm package UNIVERSAL; # UNIVERSAL should not contain any extra subs/methods beyond those # that it exists to define. The use of Exporter below is a historical # accident that should be fixed sometime. require Exporter; *import = \&Exporter::import; @EXPORT_OK = qw(isa can); 1; $ perl -MO=Xref UNIVERSAL.pm File UNIVERSAL.pm Subroutine (definitions) Package UNIVERSAL &VERSION s0 &can s0 &isa s0 Package attributes &bootstrap s0 Subroutine (main) Package Exporter &import 7 Package UNIVERSAL *import 7 @EXPORT_OK 8 UNIVERSAL.pm syntax OK $

It includes a lot of the info you need to automatically generate docs and will show lexical as well as global vars.

cheers

tachyon


In reply to Re: Large-scale code documentation by tachyon
in thread Large-scale code documentation by jacques

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.