Subject: | $0 is not working when PAR is used |
Date: | Mon, 17 Aug 2009 16:10:40 +0200 |
To: | <bug-par [...] rt.cpan.org> |
From: | Miguel Angel Rojas Gómez <mianrojas [...] hotmail.com> |
Hi all,
It seems that $0 var is not processed properly inside PAR binaries:
I've created just an small script in which you can see the behaviour I'm talking about:
# cat test.pl
#!/usr/bin/perl
print "\$0 : $0\n";
$0 = "xxxxxxxxxxx 1 2 3 4";
print "--\n";
system("ps -ef | grep -v grep | grep $$");
print "--\n";
print "\$0 : $0\n";
exit 0;
# ./test.pl A B C
$0 : ./test.pl
--
root 2992 2806 0 16:53 pts/0 00:00:00 xxxxxxxxxxx 1 2 3 4 <-- output is right. no issues.
--
$0 : xxxxxxxxxxx 1 2 3 4
There is nothing wrong here as you can see. But if you "PAR" the script:
# pp -o test test.pl
# ./test A B C
$0 : ./test
--
root 3257 2984 0 13:23 pts/1 00:00:00 xxxxxx A B C <-- See that!!!
--
$0 : xxxxxxxxxxx 1 2 3 4
It seems that only the first 6 characters are included!!. It seems to be a bug.
I'm using perl version 5.10.0 for a Debian lenny distribution with standard packages.
The behaviour of $0 has changed and PAR does not suppose to change the behaviour of the program so I consider this bug important.
Let me know if you need further details.
Thanks.
Show quoted text
_________________________________________________________________
¿Quieres los nuevos emoticonos en 3D? ¡Descárgatelos gratis!
http://www.vivelive.com/emoticonos3d/index2.html