in reply to Extracting and formatting Pod sections

One nasty trick I use to get at my POD and still have it render is the following:

my $pod = <<'=cut'; =head1 delete ... =cut

I'm not sure if Pod::Weaver refuses to convert that pod, but pod2html and CPAN know what to do and properly display that POD. Once you have your POD in a string, you can format it for further processing anyway.

Replies are listed 'Best First'.
Re^2: Extracting and formatting Pod sections
by Mike.lifeguard (Novice) on Aug 01, 2010 at 14:28 UTC

    Thanks, Corion. Let's try it!...

    [PodWeaver] can't invoke PodWeaver on lib/MediaWiki/Bot/Shell.pm: there is POD inside string literals

    Disappointing, but nowhere near critical.

    Does the POD get handled properly?... Yes! So, it looks like that'll meet my needs just fine.

      I could help with “alternativeley a)” (haven't played with Term::… yet, sorry): you could use the -sections flag: like this (from Perldoc):
      pod2usage(-verbose => 99, -sections => [ qw(fred fred/subsection) ] );