Skip Menu |

This queue is for tickets about the PAR CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: sebastian [...] expr42.net
Cc:
AdminCc:

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



Subject: Par:Packer bugs ?
Date: Wed, 31 Oct 2007 19:31:29 +0100
To: bug-par [...] rt.cpan.org
From: Sebastian <sebastian [...] expr42.net>
Goodday, Recently I started using Par::Packer and noticed a small bug in the program it seems. I've got a script named 'netstat.pl' which calls the binary 'netstat' within backticks and depends on the PATH enviroment to figure out which one it needs (in most cases the one in /bin). this script works fine. But when I make PAR binary from it with 'pp' and name it 'netstat' it goes wrong. apearently Par::Packer add it's own cachedir to the PATH. I guess it's not a good idea to name your program like that what it calls, but I can't always see what the modules call on programs or know what is in the path at each system. Now I wondered if it was possible to keep the original PATH for executing the script internally? If it't not possible could this be documented and in the manual? I also noticed something else, I haven't figured out yet where this goes wrong exactly, but apearently, the source filename needs to end on .pl. This is nowhere really clear in the manpage and I'm not sure why this is needed, but I'd atleast think it should be clearly documented. (I can supply a patch to the pod if people would think it doesn't need or can't be fixed). Thanks, Sebastian S
Hi Sebastian, Thank you for the bug report and sorry for the delay in answering. I've been very busy recently. I understand your use case of PAR::Packer wrt. executable naming. Unfortunately, it would break the expectation of many users to remove the PATH-pushing feature. Perhaps you can just add some code akin to the following to your netstat.pl? BEGIN { if (exists $ENV{PAR_TEMP}) { # running under PAR(::Packer) # remove first path entry (; for windows, : for linux) $ENV{PATH} =~ s/^[^;:]+(?:;|:)//; } } Of course, it should be a little robustified (check $^O or so for the OS and choose the path separator accordingly). Keep in mind, however, that this is really just a hack. But PAR::Packer is very unlikely to change in this regard, sorry. Show quoted text
> If it't not possible could this be documented and in the manual?
Yes, I guess so. I'm a little surprised that it's not documented. A grep for "PATH" didn't show me anything. A patch to "pp"'s documentation would be very welcome. Feel free to send it to me by email or to this bug. The second issue you raise, about perl script naming, is actually a bug. It's in Module::ScanDeps. The bug was also reported in #30743. A fixed version of Module::ScanDeps (0.78) has been uploaded to PAUSE. It should propagate to the CPAN mirrors in the next hours or days. Please install that, it will fix that problem. I'll mark this ticket as resolved. If you have any further issues, replying to it will reopen the ticket. Best regards, Steffen