I'd like to develop a script/tool/module that will aid in the automatic synchronization of POD documentation between functional base class, abstract/virtual base classes and implementation (sub)-classes. The goals include:

An example: let's say that MyClassI.pm is an purely virtual, interface class: it specifies that classes that implement MyClassI.pm must provide the following methods: "do_foo" and "get_bar", and provides "fundamental" documentation describing these two methods.

Implementation class MyClass.pm provides methods for "do_foo" and "get_bar", but the author does not write any documentation for the methods; the "autodoc" tool dynamically writes the necessary POD. Small variation: MyClass.pm needs slightly more specific/modified documentation for "get_bar" (as only certain kinds of bar's are actually handled by this implementation); the author modifies the automatically provided POD, and somehow informs the tool not to overwrite their changes during the next "sync".

Subclass MySubClass.pm isa MyClass.pm, providing a few additional methods, and not overriding do_foo nor get_bar. The autodoc tool should "copy" MyClass.pm's method documentation into MySubClass.pm (perhaps in an =head1 Appendix). Small variant: MySubClass.pm overrides do_foo, but needs no change to the documentation: MyClass.pm documentation (which itself is MyClassI.pm documentation) gets used. Small variant #2: MySubClass.pm overrides do_foo, but now does have its own specific docs, and doesn't want to be overwritten during the next sync.

I think all the necessary tools are already in place (Pod::Constants, interface.pm, etc), but before I embarked I thought I'd bounce the design principles around here for awhile; I'd also love to be told that solution already exists!

Thanks,

-Aaron


In reply to synchronized documentation by amackey

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.