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

Re: deprecating SIGDIE

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
October 4, 1999 11:30
Subject:
Re: deprecating SIGDIE
Message ID:
199910041830.TAA00435@bactrian.ni-s.u-net.com
Ilya Zakharevich <ilya@math.ohio-state.edu> 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/Foo.al",
after the manner of AutoLoader, and then if that fails "not found" 
then tried to load "Foo.pm", 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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About