Do you know where your variables are? | |
PerlMonks |
Disappearing fatal errors and die() with mod_perl2by Farenji (Novice) |
on Jul 31, 2009 at 15:10 UTC ( [id://784916]=perlquestion: print w/replies, xml ) | Need Help?? |
Farenji has asked for the wisdom of the Perl Monks concerning the following question: I hope someone can shed some light on the following strange problem: I'm using perl5.10 with mod_perl2 (ModPerl::Registry) / apache2, with a fairly big perl application consisting of quite a few own modules and a bunch of CPAN modules. Normally, when I do a die('whatever') in the code, or if there's a fatal error, this shows up in the error log like: [Fri Jul 31 16:18:58 2009] [error] whatever at module.pm line 123Lately I noticed that in certain cases, these errors disappear in some black hole. Don't know what happens with it and why. For example, this works fine: But the following will give nothing at all in the logs:
The following DOES give errors in the log:
Unfortunately, the Foo module is company confidential so I cannot post the code of this module here. I checked the entire module, including all (direct and indirect) dependencies, but so far I haven't found anything suspicious. There's no weird perl magic going on, as far as I can tell. All scripts are CGI compatible so no specific mod_perl directives. There are a lot of modules "use"d however so it's like looking for a needle in the haystack.. This problem doesn't turn up on the command line. Nor does it when I use plain old CGI. Then everything works fine. So I figure it's got something to do with mod_perl. I tried changing the die signal handler, I tried all of the following, but without the desired effect: (I also tried it without "local", no change)
For debugging purposes, redirecting the die to a warn is a viable workaround, but the application also contains a SOAP::Lite server, and in the server code, I use to throw Soap errors. The problem is that this doesn't work in cases described here; then, an empty Soap message is returned. That's a show stopper. ATM, I don't know anymore where to look and what to look for, to solve this. Could anyone point me in a direction, or give me some suggestions I might try to solve this?
Back to
Seekers of Perl Wisdom
|
|