Sun Feb 14 12:44:51 2010: Request 42986 was acted upon.
Transaction: Correspondence added by RSCHUPP
       Queue: PAR
     Subject: PAR-based modules use system XS modules over included modules
   Broken in: 0.984
    Severity: Important
       Owner: Nobody
  Requestors: t...@cpan.org
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=42986 >


On Sat Feb 13 03:37:38 2010, TJC wrote:
> > This is Perl 5.10.0, right?
> 
> Correct.

I finally remembered what's going on :(

PAR::Heavy interposes the loading of shared libraries
by tricking DynaLoader into always calling DynaLoader::dl_expandspec
(which PAR::Heavy has sneakily replaced by its own version).
DynaLoader usually first tries to locate the shared library
by explicity checking along @INC; only if this fails it
will call dl_expandspec.)
Unfortunately this trick (setting $DynaLoader::do_expand = 1)
doesn't work in Perl 5.10.0 (look into DynaLoader.pm, $do_expand
is defined, but nowhere used). It works in all versions before
and after. 

So this explains what you see: the .pm part of a XS based module
is correctly resolved from the packed executable, but the
corresponding shared library is resolved from the target system.
If the two happen to be of different versions, Perl aborts.

Looking at the versions of DynaLoader.pm in Perl 5.10.0 and
5.10.1 (on Linux) I think that you may savely replace the
former with the latter. If you do that remember to rebuild PAR::Packer 
afterwards so that packed executables will have the "fixed" 
DynaLoader.pm embedded.

Reply via email to