perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radoslaw Zielinski <ra...@karnet.pl>
Subject DynaLoader's "special case"
Date Fri, 19 Nov 2004 12:44:57 GMT
Each time I upgrade perl and the DynaLoader's version changes, I have to
rebuild mod_perl, or I'll get this error:
  DynaLoader object version 1.05 does not match $DynaLoader::VERSION 1.06

It happens when I add "PerlModule AnyXSmodule" to my httpd.conf (of
course any more complicated thing, like adding a handler or a <perl>
section also triggers it).  The module itself of course works just fine
outside mod_perl.

I finally found some time to dig the issue; when I grepped out the

  src/modules/perl/modperl_xsinit.c:    /* DynaLoader is a special case */

line I knew I'm home... ;-)  The problematic call is:

  newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);

It's triggered in mod_perl.c::modperl_xs_init(), for whatever reason.
DynaLoader.pm contains:

  boot_DynaLoader('DynaLoader') if defined(&boot_DynaLoader) &&
                                  !defined(&dl_error);

When I test it from the command line, the &dl_error is always defined,
so I think on my system the condition is always false.

My question is: what's the point of that newXS() call?  Can it be done
in any other way?

-- 
Radosław Zieliński <radek@karnet.pl>
[ GPG key: http://radek.karnet.pl/ ]

Mime
View raw message