Front page | perl.perl5.porters |
Postings from February 2003
Re: [PATCH] $SIG::UNSAFE
Thread Previous
|
Thread Next
From:
Jarkko Hietaniemi
Date:
February 23, 2003 09:16
Subject:
Re: [PATCH] $SIG::UNSAFE
Message ID:
20030223171549.GD26630@kosh.hut.fi
> In general, I think deciding on ugly/unprecedented syntax
> just to suit backward compatibility is taking things too far.
> This is how we ended up needing Perl 6. :)
True, but I do not think we have before this created a feature
explicitly to be *backward* compatible...
> I don't see why that is a showstopper. Pending a fix for the bug,
Huh? Pending for fixing the bug? We are talking about running
the code in _existing_ Perl installations. How are you going to
fix their bugs. I repeat: this feature is not intended for *future*.
It is for past and present code and installations.
> we should be able to treat an undefined value for $SIG{__ALL__}
> internally the same as if the value did not exist.
>
> If that is still unworkable for some reason, I would prefer
> adding this stuff via an extension module/pragma, maybe even
> via sigtrap.pm:
>
> use sigtrap;
> ...
> {
> sigtrap::set_local(ALARM => 'IMMEDIATE') if $] > 5.008;
> ...
> }
Lexical scope does not make that much sense for this feature.
> With a separate module, you could put it on CPAN and make it a
> dependency for when running under older perls.
I repeat: the goal was to require the minimal effort for "backporting".
Installing new modules is hardly minimal. (Well, "less minimal" than
installing new Perls...)
> use FancySignals;
> ...
> {
> set_local_signal ALARM => 'IMMEDIATE'; # noop on older perls
> ...
> }
>
> set_local_signal() will need to have local() like behavior, but
> that's easily done. The Alias extension on CPAN has been doing
> that for ages.
Patches very welcome.
> Sarathy
> gsar@ActiveState.com
--
Jarkko Hietaniemi <jhi@iki.fi> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'. It is 'dead'." -- Jack Cohen
Thread Previous
|
Thread Next