mfriedman has asked for the wisdom of the Perl Monks concerning the following question:
Hello fellow Monks and Monkesses.
I am attempting to use a child module of XML::Sablotron with mod_perl. When using it in mod_perl mode, I seem to be breaking DynaLoader, and get the error:
Can't locate auto/XML/Sablotron/new.al in @INC (@INC contains: (etc...))
Due to the following code:
The error occurs on the line where I call the super-class constructor. Oddly, this code works perfectly when running via normal Perl, but dies with that error when running via mod_perl. I have checked mod_perl's @INC and confirmed that the right directories are there, and have Dumper()ed %INC and seen that XML::Sablotron is indeed loaded. I have tried loading XML::Sablotron in my Apache startup file before my child module gets loaded, I have tried hardcoding the class name in my constructor, and a lot of other things I can't remember, all with the same result. The environment is perl 5.005_03 and mod_perl 1.25, running on FreeBSD. Any help would be greatly, greatly appreciated. Thanks. :)package My::Groovy::Module; use strict; use XML::Sablotron; use vars qw(@ISA, $VERSION); @ISA = qw(XML::Sablotron); ... sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(); ... }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: DynaLoader errors with mod_perl
by perrin (Chancellor) on Apr 30, 2003 at 05:17 UTC | |
by mfriedman (Monk) on Apr 30, 2003 at 21:28 UTC | |
by perrin (Chancellor) on May 01, 2003 at 02:10 UTC | |
Re: DynaLoader errors with mod_perl
by gmpassos (Priest) on May 01, 2003 at 03:47 UTC |
Back to
Seekers of Perl Wisdom