Here is one potential solution (just wrap it in a sub and tweak a litle), if you insist on having a single master pod file for all your apps.
use Pod::POM; use Pod::POM::View::Text; my $view = Pod::POM::View::Text->new(); my $parser = Pod::POM->new(); # parse from text or file my $pom = $parser->parse_file(__FILE__) || die $parser->error(); # examine any warnings raised for my $warning ($parser->warnings()) { warn $warning, "\n"; } #use Data::Dumper; die Dumper $pom; # in case you wanna know what it l +ooks like for my $head1 ($pom->head1()) { if( $head1->title() =~ /Popcorn app/i ) { print $head1->present($view); # display as text ## same thing # print $view->print($head1); # print Pod::POM::View::Text->print($head1); last;# bust out of the for loop } } __DATA__ =head1 Butter app Butter app does this'n'that, and this'n'this =head2 Options blah blah =head1 Popcorn app Popcorn app does this'n'that, and this'n'this =head2 Options blah blah =head1 Fudge app Fudge app does this'n'that, and this'n'this =head2 Options blah blah =cut
It is important to note that Pod::POM has a few minor logic flaws, but for casual pod it doesn't matter. Pod::POM does not handle =begin format/=end format correctly. It insists on searching the stuff in between for Formatting Codes, which it shouldn't do except in special circumstances. I rather like the module, and have contacted the author about this problem.


MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
** The Third rule of perl club is a statement of fact: pod is sexy.


In reply to (try Pod::POM) Re: perl POD by PodMaster
in thread perl POD by hotshot

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.