I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2010-09-11 05:43:33.904806-07 by roderich in response to 12939
Re: binary generated out of recursive perl script not working
That explains it.
Look into the cache directory where stuff packed into your executable is extracted to (it's usually called /tmp/par-USER/SHA1CHECKSUM). You should see a file called myScript there (i.e. with the same name as your packed executable), but it is NOT a copy of your executable. It is a special purpose perl interpreter (and always the same).
Now the packed executable runs in an environment where PATH has been augmented with the cache directory. Hence when you simply invoke myScript (i.e. without a path), you likely will run the file myScript in the cache directory. The error message you saw would support this theory.
Try to use system("$0 ...") instead. That should run the original executable (or script in the unpacked case). This has the addidtional benefit that you don't have to edit your script if you ever decide to rename myScript to something else :)
Cheers, Roderich
Direct Responses: 12941 | Write a response