Tue Aug 18 09:16:24 2009: Request 48770 was acted upon. Transaction: Correspondence added by mianro...@hotmail.com Queue: PAR Subject: RE: [rt.cpan.org #48770] $0 is not working when PAR is used Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: mianro...@hotmail.com Status: open Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=48770 >
Hi, Here are my comments: > In general, it is NOT reasonable to expect that a packed program > will behave absoolutely identical to the original script. PAR tries > hard and jumps thru several hoops to make some stupid constructs > magically work out of the box. But there are known cases, where > it doesn't work and you have to change your expectations and > your code. Ok, that would mean that PAR a perl file is not really useful if, as you mentioned, because perl code behaviour would change. Unless you really know which functions/contructions are not affected. Is there a list in which we can take a look at? I think this is something should be stated in the man pages and CPAN PAR web. > It might be possible to rewrite the handling of argv and envp > in PAR::Packer (actually it's parl as embedded in every > packed executable) so that the "shrinking" of the environment > can be avoided. > Patches welcome, the stuff is in myldr/*.c in the PAR::Packer source. > You might want to consult the Perl source (mg.c and perl.c in > particular) to study the contortions Perl has to go thru to > implement the current behaviour. Thanks! I took a look into it and the behaviour seems as you mentioned. But anyway, I think argv and envp behaviour should not be changed in a PAR executable (quite critical if you want to access these option in your code). Of course, it seems this is not something trivial but it is something is impacting perl coding, and if this is not fixed, it should be reflected somewhere. Miguel. _________________________________________________________________ Entérate de todas las noticias al instante ¡Suscríbete al servicio de Alertas MSN! http://especiales.es.msn.com/noticias/msninforma.aspx