Is there a way to create CPAN-specific pod? I'm looking for something like this:

=for CPAN This paragraph will only appear on CPAN. =for HTML This paragraph will be processed by any HTML formatter (including Padre's help, for better or for worse). This paragraph would appear in all pod. =cut

Why would I want this? Because much of the POD documentation for PDL is created when you install PDL. Since CPAN holds the not-yet-processed files, lots of the pod that CPAN holds is fubarred. To see what I mean, take a look at PDL::Slices on CPAN and do a text search for EOD. Now, look at PDL::Slices in PDL's HTMLified doc pages and you'll see it looks fine. I would like to add CPAN-specific pod at the top of each .pd file stating something like this:

=for CPAN You are looking at the documentation for this module on CPAN, but the documentation is only properly generated when the module is compiled. Since the documentation here will likely be idiosyncratic, you should instead check L<http://pdl.sourceforge.net/PDLdocs/mode-name.html>.

Admittedly, an alternative to this problem would be to add a step in the module compilation to strip out CPAN-specific paragraphs, which wouldn't be too hard, but I'm trying to be lazy here. :)

Any suggestions?


In reply to CPAN-specific POD? by pdltiger

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.