develooper Front page | perl.perl5.porters | Postings from June 2020

Re: What am I not grokking about $SIG{__WARN__}?

Thread Previous | Thread Next
From:
Sergey Aleynikov
Date:
June 30, 2020 13:54
Subject:
Re: What am I not grokking about $SIG{__WARN__}?
Message ID:
CAKNj8S3Jy9hd7yRMi37F6kv1i6w_mTveL+-THESnvNwQ83ghfA@mail.gmail.com
вт, 30 июн. 2020 г. в 16:38, James E Keenan <jkeenan@pobox.com>:
> BEGIN { local $SIG{__WARN__} = sub { $thiswarn = $_[0]; }; }

LeoNerd answered about the 'local' behaviour here, but if you really
need it - you can put a second BEGIN block at the end of the file,
clearing/restoring __WARN__ handler.

Best regards,
Sergey Aleynikov

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