Re: mod_perl and XML::LibXML

[prev] [thread] [next] [Date index for 2005/03/18]

From: Stas Bekman
Subject: Re: mod_perl and XML::LibXML
Date: 01:04 on 18 Mar 2005
James Orr wrote:
> Hi,
> 
> I have an occaisional error happening with a module i'm using from a
> mod_perl script.  This is in my "new" method ...
> 
> my $ifh = IO::File->new($project_dir.'/info.xml') || die "Can't open
> info file: $!";
> $data->{'info'} = $parser->parse_fh($ifh);
> 
> And the error it gives is ...
> 
> read on filehandle failed: Can't use an undefined value as a symbol
> reference at /usr/lib/perl5/site_perl/5.8.4/i686-linux/XML/LibXML.pm
> line 336.
> 
> By occaisional I mean that this error has occured 21 times in over
> 21,000 hits.

James, assuming that you don't use any eval {} blocks, try to install:

use Carp;
$SIG{__DIE__} = \&Carp::confess;

(e.g. at the startup or your script)

so the next time it fails you will see the exact calls trace. You can 
further expand that sighandler to dump more information to figure out what 
triggers the problem, helping you to define a reproduceable at will test 
program which can them be easily solved.




        -- 
        __________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

mod_perl and XML::LibXML
James Orr 14:23 on 17 Mar 2005

Re: mod_perl and XML::LibXML
Stas Bekman 01:04 on 18 Mar 2005

Re: mod_perl and XML::LibXML
D. Hageman 09:15 on 18 Mar 2005

Generated at 15:10 on 27 Mar 2005 by mariachi v0.52