I'm kinda fond of Pod::Usage to auto-generate usage messages from
included POD documentation. So, when I used PAR for the first time
recently, my program used Pod::Usage. Everything went great, I deployed
my PAR-bundled executable with no problems. But later when I ran the
program with --help and --man, it didn't print out anything.
I've reduced it down to a test program about as small as you can get.
Here's what happens:
$ perl ./test.pl --help
Usage:
test [options]
Options:
--help Print a brief help message and exit.
$ perl/bin/pp -o test test.pl
$ ./test --help
$ ./test
Made it past the options...
$
It takes about 10 seconds for the par-bundled program to run with the
--help option (and do nothing). It finishes in less than a second if
I remove the --help option.
Any suggestions (even if it's just "Don't use Pod::Usage")?
Here's the test script:
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
use Pod::Usage;
my $help;
GetOptions(
"help" => \$help,
) or pod2usage(2);
pod2usage(1) if $help;
die "Made it past the options...\n";
=head1 NAME
test - Test Pod::Usage with PAR
=head1 SYNOPSIS
test [options]
=head1 OPTIONS
=over 8
=item B<--help>
Print a brief help message and exit.
=back