develooper Front page | perl.perl5.porters | Postings from October 1999

Re: deprecating SIGDIE

Thread Previous | Thread Next
Nick Ing-Simmons
October 4, 1999 11:30
Re: deprecating SIGDIE
Message ID:
Ilya Zakharevich <> writes:
>Nick Ing-Simmons writes:
>> That fixes that. But still does not fix:
>>    eval { require $path };
>>    if ($@ =~ /.../)
>>     {
>>     } 
>Fix *what*?  Why do you expect this to work at all?

Tk has for a long time tried loading "/some/path/",
after the manner of AutoLoader, and then if that fails "not found" 
then tried to load "", if _that_ fails it assume Foo is 
a delegated method.

Note that other fails (syntax errors, missing modules etc.) are 
are just reported as-is.

It works with the local $SIG{__DIE__} "fix".
But if a SIGDIE handler mangles the message it does not look like 
a "not found" error anymore and the script exits rather than using
one of the fallbacks.

(I do _NOT_ recommend this scheme for new code, it is a backward 
compatibility workround which I wish I had not started...)

Nick Ing-Simmons

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About