On Thu, 2006-03-30 at 13:00 -0500, Alex Laslavic (Lenox) wrote: > On Thu, 2006-03-30 at 16:17 +0200, Roderich Schupp (ext) wrote: > > > pp.exe is from ActiveState's package manager. I suppose I > > > can build it > > > by hand, and see if I get anything different, however, the correct > > > version of Scalar::Util is packed into the exe. > > > > Actually there are TWO versions of Scalar::Util etc in > > the executable created by pp from my oneliner: > > - one is in the zip archive at the end of the executable; > > this one you can list/extract by running e.g. unzip on > > the excutable; this one is from the machine where > > you ran pp > > - the other is in the data section of the executable; > > you can see it with "strings file.exe"; > > it is copied verbatim from parl.exe where it got included > > when your PAR package was built; it's part of the > > pp'ed executables' bootstrap, because some perl modules > > are already needed extracted before PAR can get to > > the modules in the zip archive > > So there's a potential mismatch, but that's just a wild guess. > > > > Does the oneliner from my previous email have the same problem as your > > script? > > You are right on. The packed exe has version 1.07, and the script is > written, and using 1.18. Now, if only I can get it to use 1.18.... > > use Scalar::Util 1.18 qw/refaddr/ doesn't seem to work.... > > Oddly, when I unzip the exe that I have created with pp, the 1.18 > version is actuall in the LIB/SCALAR/ directory, but it doesn't seem to > get loaded at runtime, even with: > use Scalar::Util 1.18 > > Any ideas?
For the sake of future google searchers, here is how I worked around
this.
Scalar::Util 1.07 is currently packaged into pp.exe, as it is shipped
from ActiveState PPM. You could probably recompile PAR, and pp.exe, but
I don't have Visual C++ handy, so I got around it another way.
The problem is that 1.07 was already loaded into %INC by the time my
script was executed, and I couldn't then load 1.18. My solution:
delete $INC{'Scalar/Util.pm'};
eval 'use Scalar::Util 1.18 qw(refaddr);';
This removes the 1.07 Scalar::Util, and then allows me to load 1.18 at
runtime. Not pretty, but it works.
>
> ls
>
>
>
>
>
> >
> > Cheers, Roderich
--
***********************************
* Alex Laslavic
* Linux Engineer
* WorldTravel BTI
* x49511
* gpg/pgp key at
* http://keys.jumpbox.net
***********************************
signature.asc
Description: This is a digitally signed message part
