And it's not on by default, because AUTOLOAD introduces all kind of problems. And as explained in:
http://perl.apache.org/docs/2.0/api/ModPerl/MethodLookup.html#C_AUTOLOAD_
and I weren't able to use it in any phase before PerlChildInitHandler, which means that it won't work for your startup.pl.
The problem comes from the fact that we need to use UNIVERSAL::AUTOLOAD. We can't use plain package AUTOLOAD, precisely because of the chicken and egg problem. We don't know which module to load, and if we load them all, we don't need AUTOLOAD. So I figured UNIVERSAL::AUTOLOAD is the only workable solution.
If you have better ideas solving this problem I'm all ears.
"Moreover installing UNIVERSAL::AUTOLOAD may cause a lot of problems, since once it's installed Perl will call it every time some method is missing (e.g. undefined DESTROY methods)."
Well, the DESTROY method issue could be fixed with adding a:
sub UNIVERSAL::DESTROY { undef }
method? (note I'm adding an undef here because 5.8.2 has an issue with empty subs).
That's fine, but that's introducing bloat (which may not be such a problem with perfork MPM's, but _may_ be a problem with other MPM's, particularly based on Perl 5 ithreads).But someone needs to trigger that custom die() handler. Or are you talking about installing $SIG{__DIE__} instead of using AUTOLOAD for trapping? You are aware that doing that comes with its own pile of problems, in certain contexts (.e.g. eval {} blocks)
Maybe it shouldn't be an AUTOLOAD, but a custom die() handler... ;-)
I was more thinking along the lines:
BEGIN { *CORE::GLOBAL::die = sub { warn "We're not dieing with @_\n"; } }; die "This is it!"; warn "Well, I guess it wasn't.\n";
Liz
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]