Subject: | Pod::Usage spawns external perl process which breaks with PAR |
Put the following into a file called test.pl:
use Pod::Usage;
pod2usage(-verbose => 2)
__END__
=head1 SYNOPSIS
pod2usage
Run "perl test.pl" and it produces the expected output (the whole manpage).
Now compile the script using PAR. (On Windows I use "pp -o test.exe test.pl".) Run the compiled executable on a different machine (or in a different shell window / command prompt) which doesn't have perl available and I get the following output:
'perl' is not recognized as an internal or external command,
operable program or batch file.
You do not have Perl in your PATH.
I believe this is because Pod::Usage::pod2usage() just calls perldoc:
## spit out the entire PODs. Might as well invoke perldoc
my $progpath = File::Spec->catfile($Config{scriptdir}, "perldoc");
system($progpath, $opts{"-input"});
but, of course, that requires perl[.exe] to be available, which it isn't having deployed the compiled executable onto another machine without perl.
So this is really an enhancement request to have Pod::Usage::pod2usage() handle the whole manpage scenario itself, rather than copping out and calling an external process.
I'm using perl-5.8.6, PodParser-1.28 and PAR-0.87 on WinXP.