Mon Aug 17 10:11:04 2009: Request 48770 was acted upon.
Transaction: Ticket created by mianro...@hotmail.com
       Queue: PAR
     Subject: $0 is not working when PAR is used
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: mianro...@hotmail.com
      Status: new
 Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=48770 >



      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.

_________________________________________________________________
¿Quieres los nuevos emoticonos en 3D? ¡Descárgatelos gratis!
http://www.vivelive.com/emoticonos3d/index2.html

Reply via email to