I suspect I know just what you are looking for; after I posted a module last night, mkmcconn mentioned that he found the inline POD very hard to read, so I whipped up a quick-and-dirty little script that takes POD embedded in a file and moves it all down to the end. Not tested too extensively, but it basically seems to work:
die "Usage: SegregatePod filename\n" unless @ARGV == 1; open INPUT, $ARGV[0] or die "Unable to open $ARGV[0]: $!\n"; my @paragraphs = do {local $/ = ""; <INPUT>}; close INPUT; my $inside_pod = 0; my $extracted_pod = ''; my $leftover_code = ''; foreach my $this_paragraph (@paragraphs) { if (substr($this_paragraph,0,4) eq '=cut') { $inside_pod = 0; $this_paragraph = ''; # =cut no longer needed since POD sections w +ill be contiguous } elsif (substr($this_paragraph,0,1) eq '=') { $inside_pod = 1; } if ($inside_pod) { $extracted_pod .= $this_paragraph; } else { $leftover_code .= $this_paragraph; } } print "$leftover_code\n$extracted_pod\n";

Of course you could simply omit $extracted_pod from the last line if you didn't want to see it at all.

As for the inline code, I've learned my lesson, and future submissions will have the POD at the end ;-)


In reply to Re: perldoc code only by seattlejohn
in thread perldoc code only by jonjacobmoon

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.