Just have a look at CGI.pm

"Yes, but ..."

The v4.x series of CGI.pm has introduced some drastic changes, but they were poorly communicated (see Re: Replacing CGI.pm, Re^2: "CGI::param called in list context" confusion, "CGI::param called in list context" confusion, and probably many more threads). Take it as a bad example.

If you introduce new warnings or errors, document that fact. If you break existing code, document that fact. Don't hide such information five levels deep in the filesystem. Put it into the main documentation, and make sure it is read. "Incompatible Changes" is a great heading for such kind of information. Also list such changes in your change log.

Depending on how complex your module is, and how much documentation already exist, you may want to move parts of the documentation into another POD file. If you introduce a new API, you could move the documentation for the old API to Whatever-API-v1.pod and link to that file from the main documentation. If you build up a huge amount of incompatible changes, do the same and place the link to the Whatever-incompat.pod in a prominent place of the main documentation.

If your module is a frontend to several backends, like DBI, keep the backend API documentation out of the main documentation (compare with DBI::DBD). Document what is needed for someone using the frontend.


A second problem of CGI.pm's documentation is its structure. It reads more like a cookbook and less like other module's documentation. Don't get me wrong, I like to have a cookbook, especially for complex modules. But it should not be the main documentation. After a while, you know the most frequently used functions by heart, and you want to look up other functions by name, not by purpose. Compare with DBI.

The cookbook part of CGI (the "HTTP COOKIES" and "SERVER PUSH" chapters and all chapters with headings matching /ing/i, perhaps except for "Calling CGI.pm routines") should really be in something like CGI::Cookbook. In the main documentation, I expect to find documentation for all public methods. I also expect to find the method names in the table of contents, i.e. in headings. Again, see DBI.

With all the cookbook parts removed, the main CGI v4.x documentation is quite thin:

What's missing?

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^4: Sane deprecation policy for a CPAN module? by afoken
in thread Sane deprecation policy for a CPAN module? by Dallaylaen

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.