Danny Rathjens wrote:
I started getting this error sporadically from different pieces of code.
Both modules(cached) and scripts(not cached):
   [error] PerlRun: `Undefined subroutine &Data::Dumper::Dumper

perl -MData::Dumper -e'print Dumper %ENV' works fine from commandline
which rules out a hdd problem.

An apache restart stopped error completely, which led me to think
it was a RAM problem that messed up the symbol table in a certain
apache child which caused the sporadic errors.

I had no errors for ten days, but now it started doing it again,
with the exact same undefined message for Dumper, which makes me
realize it's not a RAM issue.

It started yesterday, and code had not been modified for 5 days.
I also have
PerlInitHandler Apache::StatINC
PerlSetVar StatINC_UndefOnReload On

Any ideas what could be causing this problem, or suggestions as to how
I should investigate it further?

Here is my version info
Embedded Perl version v5.6.1 for Apache/1.3.29 (Unix) mod_throttle/3.1.2 mod_perl/1.29 mod_ssl/2.8.16 OpenSSL/0.9.6b


This is the simplified script I made to reproduce the problem:
#!/usr/bin/perl
use Data::Dumper;
print "Content-type: text/plain\n\n";
print Dumper(\%ENV);
exit;

Which resulted, sporadically(upon hitting certain apache child I assume), in this error:
[Fri May 28 15:09:25 2004] [error] PerlRun: `Undefined subroutine &Data::Dumper::Dumper called at /data/cgi-bin/printenv line 4

I think it's due to your use of StatINC, please have a read of this section: http://perl.apache.org/docs/2.0/api/Apache/Reload.html#Problems_with_Scripts_Running_with_Registry_Handlers_that_Cache_the_Code

You should move to Apache::Reload anyway (for mp1 it's available on CPAN, mp2 is a part of the core), though you will probably have the same issue.

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to