in reply to Re: pod::usage "-sections" not working
in thread pod::usage "-sections" not working

Weird...I've copied your code and still getting just the message and not the pod section "special". No doubt I must be overlooking something simple. I'll look some more. Thanks toolic. J

  • Comment on Re^2: pod::usage "-sections" not working

Replies are listed 'Best First'.
Re^3: pod::usage "-sections" not working
by ww (Archbishop) on Apr 25, 2013 at 19:50 UTC
    If what you say is based on accurate copy/test of toolic's code, then next you'd best tell us about any and ALL untoward outputs.

    Better yet, you might want to walk thru your/toolic's code with the debugger and tell us what that discloses.

    If you didn't program your executable by toggling in binary, it wasn't really programming!

Re^3: pod::usage "-sections" not working
by Khen1950fx (Canon) on Apr 25, 2013 at 21:58 UTC
    It should be something simple. Try this for the SPECIAL section:
    #!/usr/bin/perl BEGIN { $| = 1; $^W = 1; } use strict; use warnings; use Pod::Usage; use Getopt::Long; my $help = 0; pod2usage(2) unless GetOptions('help|?' => \$help); my $verbose = 99; my $message_text = "special usage stuff here...\n"; my $sections = 'SPECIAL'; pod2usage( -verbose => $verbose, -message => $message_text, -sections => $sections, ); __END__ =head1 SYNOPSIS here's the main usage stuff =head1 SPECIAL special usage stuff here... =cut