in reply to Re: Prevent my STDERR logging in evals...
in thread Prevent my STDERR logging in evals...
Close, but so wrong!
- $SIG{__WARN__} should have been localized.
- $SIG{__WARN__} doesn't hide the message from an exception such as $a=10; $a->isa('foo').
- local *STDERR; simply replaces the text with the warning "print() on unopened filehandle STDERR".
- Warnings don't set $@.