Steffen Mueller wrote:
Hi Malcolm,

Malcolm Nooning schrieb:
The -c seems to be broken, but the error message is misleading. In the final analysis, Zip.pm is being handed a $name string with "C:/perl/site/lib/sitecustomize.pl" errantly tacked onto the end of it, for sub extractMember in Zip.pm, as I think I will show. I do not know where pp is doing it. I will take a guess here that if we can find out what is tacking C:/perl/site/lib/sitecustomize.pl onto the said $name string and simply remove it, the problem might be solved. At least, it is something that can be looked at.


I can't reproduce this problem, so I can't debug it. However, perhaps I can give you a few suggestions:

Do you know *where* the bad string is passed to Archive::Zip? That would help tremendously with debugging this. You specifically talk about a variable $name. I'll take that you're looking at a specific piece of code. Supposing $name is in Archive::Zip (say, in new() or so), then you can find out where it's coming from by adding these two lines to the corresponding method:

use Carp qw/cluck/;
cluck($name) if $name =~ /C:\/perl\/site/; # or similar

and look at the stack trace(s) that are printed.

Good luck!

Steffen

As alluded to in the email you sent after this one, which I will look into soon, the printouts and traces here will only pinpoint where the symptoms first appear. The results merely show that a.exe already has the bug embedded in it. Thus there is little efficacy in reading this any further, except to say that, yes, the problem is already built into a.exe.

I will paste the traces anyway for completeness.


-----------paste result Carp::cluck($name) if $name =~ /C:\/perl\/site/;
-----------put in C:\perl\lib\Archive\Zip.pm
C:\aaa>pp -c hello.pl
Set up gcc environment - 3.4.2 (mingw-special)

C:\aaa>a
PAR: file is C:\aaa\a.exe
C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-47dd25f0d96d76185f811633af835bed5c2cafd9/inc/lib/C:/perl/s
ite/lib/sitecustomize.pl at C:/perl/lib/Archive/Zip.pm line 647

Archive::Zip::Archive::extractMember('Archive::Zip::Archive=HASH(0xf79f48)', 'lib/C:/perl/site/lib/sitecustomize.pl', 'C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-47dd25f0d...') called at C:/perl/site/lib/PAR.pm line 515 PAR::_extract_inc('C:\aaa\a.exe') called at C:/perl/site/lib/PAR.pm line 305
        PAR::import('PAR') called at -e line 884
        eval {...} called at -e line 171
        __par_pl::BEGIN() called at -e line 896
        eval {...} called at -e line 896
mkdir C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-47dd25f0d96d76185f811633af835bed5c2cafd9/inc/lib/C:/
: Invalid argument at C:/perl/lib/Archive/Zip.pm line 660

C:\aaa>
----------------------end paste result of

I then put in two lines below, into PAR.pm. The reported line PAR.pm numbers will now be shifted by two. The results merely show that a.exe already has the bug embedded init.

   print STDERR "PAR line 268: progname and args are $progname @args\n";
   Carp::cluck($progname);

------------------paste new results
C:\aaa>pp -c hello.pl
Set up gcc environment - 3.4.2 (mingw-special)

C:\aaa>a
PAR line 268: progname and args are C:\aaa\a.exe
C:\aaa\a.exe at C:/perl/site/lib/PAR.pm line 269
        PAR::import('PAR') called at -e line 884
        eval {...} called at -e line 171
        __par_pl::BEGIN() called at -e line 896
        eval {...} called at -e line 896
PAR: file is C:\aaa\a.exe
C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-0ac3e03d0227dad01f5ea3d99c14469545d6765c/inc/lib/C:/perl/s
ite/lib/sitecustomize.pl at C:/perl/lib/Archive/Zip.pm line 647

Archive::Zip::Archive::extractMember('Archive::Zip::Archive=HASH(0xf79984)', 'lib/C:/perl/site/lib/sit ecustomize.pl', 'C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-0ac3e03d0...') called at C:/perl/site/lib
/PAR.pm line 516
PAR::_extract_inc('C:\aaa\a.exe') called at C:/perl/site/lib/PAR.pm line 306
        PAR::import('PAR') called at -e line 884
        eval {...} called at -e line 171
        __par_pl::BEGIN() called at -e line 896
        eval {...} called at -e line 896
mkdir C:\DOCUME~1\malcolm\LOCALS~1\Temp\par-malcolm\cache-0ac3e03d0227dad01f5ea3d99c14469545d6765c/inc/lib/C:/
: Invalid argument at C:/perl/lib/Archive/Zip.pm line 660
------------------end paste

Reply via email to