You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Torsten Foertsch <to...@gmx.net> on 2008/03/19 16:04:02 UTC

[PATCH] Problem with Apache2::XSLoader

Hi,

I have an XS module that is loaded with:

use Apache2::XSLoader ();
our $VERSION = '0.05';
Apache2::XSLoader::load __PACKAGE__;

Is Apache2::XSLoader for public use or is it only mod_perl-internal? I am 
asking because no documentation is found for this module.

Anyway, if a previous version of my module is already installed then I get 
version conflicts between the xs and the pm parts while testing.

The reason is this line from XSLoader::load:

    my $modlibname = (caller())[1];

It obviously assumes that there is nothing in between in the caller chain.

But Apache2::XSLoader::load calls XSLoader::load as

    XSLoader::load(@_);

Wouldn't it be better to change this line to

    goto &XSLoader::load;

to make XSLoader happy?

Torsten