johnguillory has asked for the wisdom of the Perl Monks concerning the following question:
I can't get the "-sections" option to work when targeting pod sections. See abstracted code below. Thanks for insight.
use Pod::usage; use Getopt::Long; GetOptions("help"); =head1 SYNOPSIS here's the main usage stuff =head1 SPECIAL special usage stuff here... =cut # This prints SYNOPSIS above just fine as expected: pod2usage(-verbose => 0) if ($opt_help); # This only prints the '-message' and nothing else: pod2usage({-verbose = > 99, -sections => [qw(SPECIAL)], -message => "Here's special stuff...\n"; });
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pod::usage "-sections" not working
by toolic (Bishop) on Apr 25, 2013 at 17:16 UTC | |
by johnguillory (Initiate) on Apr 25, 2013 at 18:31 UTC | |
by ww (Archbishop) on Apr 25, 2013 at 19:50 UTC | |
by Khen1950fx (Canon) on Apr 25, 2013 at 21:58 UTC | |
|
Re: pod::usage "-sections" not working
by Anonymous Monk on Apr 26, 2013 at 07:06 UTC |