New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tieing $SIG{__WARN__} is inconsistent #7445
Comments
From fergal@esatclear.ieCreated by fergal@esatclear.ieTested with 5.8.3 and 5.8.5. It seems that perl has to see you putting a code ref into $SIG{__WARN__} #! /usr/bin/perl tie $SIG{__WARN__}, "Ignore", sub { warn "you should not see this but you will"; package Ignore; sub TIESCALAR sub FETCH sub STORE {} The same applies to $SIG{__DIE__}. perl should treat tieing just like assignment in terms of switching on and Perl Info
|
From fergal@esatclear.ieOn Wed, Aug 04, 2004 at 07:59:24PM +0100, Nick Ing-Simmons wrote:
I was trying to provide warn and die handlers which were as invisible and my $obj = tie $SIG{__WARN__}, "Hide", \&my_handler; sub my_handler { so some bad code could come along and do $SIG{__WARN__} = sub { blah }; and my handler would survive and call the new handler at the end. This $SIG{__WARN__} = undef; then my handler will not be called even though $SIG{__WARN__} still gives a I presume there is an optimisation somewhere monitoring what appears to be I don't really have an appliction for this, I was writing a stack tracing F |
From nick@ing-simmons.netFergal Daly <perl5-porters@perl.org> writes:
Tie is normally used to defer actions until assign/test happens. What is the purpose of the tie? |
The RT System itself - Status changed from 'new' to 'open' |
From nick@ing-simmons.netFergal Daly <fergal@esatclear.ie> writes:
...
With that wording it does sound like a bug.
|
From fergal@esatclear.ieOn Thu, Aug 05, 2004 at 08:09:20AM -0000, Nick Ing-Simmons via RT wrote:
This is the original example with an extra 3 lines to demonstrate what F #! /usr/bin/perl tie $SIG{__WARN__}, "Ignore", sub { warn "you should not see this but you will"; ################################ package Ignore; sub TIESCALAR sub FETCH sub STORE {} |
From @jkeenanOn Thu Aug 05 01:54:59 2004, fergal wrote:
Discussion in this ticket petered out eight years ago, and Nick is no Is there anyone who could review the issues and make a recommendation? Thank you very much. |
Migrated from rt.perl.org#30926 (status was 'open')
Searchable as RT30926$
The text was updated successfully, but these errors were encountered: