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

Re: deprecating SIGDIE

Thread Previous | Thread Next
Gurusamy Sarathy
September 30, 1999 11:04
Re: deprecating SIGDIE
Message ID:
On Thu, 30 Sep 1999 17:43:01 +0200, Raphael Manfredi wrote:
>:IMO, eval should just do the local($SIG{__DIE__})
>Tom's fix, as I understand it, provides the application with the ability to
>fix one __DIE__ hook, and only one. That means no module should use it and
>it must be reserved for the application. Else they must localize the change an
>it is scoped at run-time, for the execution of a well-defined piece of code.
>Just like signals. I'd hate to see a module change my signal handlers under
>the hood, permanently. A localized change is OK (ala system()).

I like that as a good thumb rule, but I'm afraid any old imposition of
the concept doesn't make for very clean semantics.

How do you define (or perl know) where "application" ends and "module"
begins?  We don't want semantics changing out from under us just because
we happen to run the main content of our "application" via
C<do 'the-thing'> (or C<require>, for that matter).

By your argument, we should restrict setting %SIGs to "applications",
and nobody wants that.  I know Tom is going to scream if we break :-)

In any case, using PL_in_eval to decide whether we want to honor hooks
is not the best approach.  PL_in_eval has a misleading name--it is set
for C<do> and C<require>, among other things.


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