On Thu, 2006-03-30 at 14:46 +0200, Roderich Schupp (ext) wrote: > > I'm trying to create a packed exe to deploy on windows servers. > Build > > as 'pp -o file.exe script.pl' . Builds fine, but when I run it I get: > > > > Undefined subroutine &Scalar::Util::refaddr called at overload.pm > > line92. > > > > In an attempt to troubleshoot this, I added: > > use Scalar::Util qw(refaddr); > > to the script. > > > > The script still runs fine when I run script.pl through perl, but now, > > when I package the exe, and run it i get: > > "refaddr" is not exported by the Scalar::Util module > > Can you verify that Scalar::Util was correctly packed by running > > unzip -l file.exe > > You should see something like > ... > 3370 03-30-06 14:12 lib/Scalar/Util.pm > ... > 28770 11-02-05 09:49 lib/auto/List/Util/Util.dll > > (that's right: List/Util/Util.dll is where the XS version of refaddr > comes from) > > Note that I couldn't reproduce your problem with the following oneliner > (ActiveState 5.8.7 build 815, PAR 0.92, Scalar::Util 1.14) > > pp -o ref.exe -e "use Scalar::Util qw/refaddr/; my $x; my $a=refaddr > \$x; print qq[refaddr=$a\n];" > > Cheers, Roderich
Util.pm and Util.dll are the same version, both for the perl running on
my system, and for the files packed into the exe.
>
>
>
>
>
>
> >
> > This is somewhat confusing, as obviously Scalar::Util successfully
> > exportts refaddr when run as a perl script, but as the
> > packaged exe, it
> > does not.
> >
> > In Scalar/Util.pm:
> > refaddr is listed in @EXPORT_OK
> > however, sub refaddr { ... } is in a block that is only eval'd if a XS
> > import fails. Somehow it appears that in the pp packed
> > version, the XS
> > doesn't load, but that block is not evaled either, as the refaddr
> > function is not exportable.
> >
> > I guess I can fix it by hacking the XS load out of Scalar/Util.pm, and
> > forcing the sub refaddr { ... } perl function to be eval'd, but I was
> > sort of hoping someone else had a cleaner way to do this.
> >
> >
> > Thanks.
> >
> >
> >
> > --
> > ***********************************
> > * Alex Laslavic
> > * Linux Engineer
> > * WorldTravel BTI
> > * x49511
> > * gpg/pgp key at
> > * http://keys.jumpbox.net
> > ***********************************
> >
--
***********************************
* 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
