Skip Menu |

This queue is for tickets about the PAR CPAN distribution.

Report information
The Basics
Id: 5302
Status: resolved
Priority: 0/
Queue: PAR

People
Owner: Nobody in particular
Requestors: steve.hay [...] uk.radan.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.79
Fixed in: (no value)



Subject: PAR breaks script using Pod::Usage
I've been trying to use PAR to create an executable from a script that uses Pod::Usage, but the pod2usage() messages are not working. The following short test script reproduces the problem: ===== use Pod::Usage; pod2usage(-verbose => 0) __END__ =head1 SYNOPSIS pod2usage ===== If I put this in a file called "test.pl" and run "perl test.pl" then it outputs: Usage: pod2usage If I now produce an executable using "pp -o test.exe test.pl" and then run "test.exe" then I get no output at all. My understanding was that POD would be removed from dependent modules, but not from the original source script, so why doesn't this work? I had exctly the same problem recently with the Perl2Exe software. I reported the problem to the Perl2Exe support team, and was recently informed by them that "due to the way that Pod::Usage has been programmed, it is incompatable with perl2exe". I hope the same does not turn out to be true of PAR as well. Versions: Windows XP SP1, Perl 5.8.2, PAR 0.79, PAR-Dist 0.07. - Steve
[SHAY - Thu Feb 12 06:08:42 2004]: Show quoted text
> I've been trying to use PAR to create an executable from a script that > uses Pod::Usage, but the pod2usage() messages are not working.
Sorry for the belated reply. :-) This problem has been addressed and fixed in the upcoming PAR 0.81 release. The cause is that Pod::Usage uses $0 as the POD source, and $0 is an executable file. I have introduced a $ENV{PAR_0} variable that ponts to the textual representation of the main script, and told "pp" to adjust Pod::Usage to favor $ENV{PAR_0} over $0. If you do have a VC++ or MinGW compiler, I'd be happy if you can confirm that this snapshot works for you before I make the 0.81 release: http://p4.elixus.org/snap/PAR.tar.gz Thanks! /Autrijus/