in reply to Re: Prevent my STDERR logging in evals...
in thread Prevent my STDERR logging in evals...

By the way, you can avoid the need for any of shenanigans in this particular case by using isa as a function.

... in the same way that you can avoid warnings by not using strict and warnings and redirecting STDERR to /dev/null.

Replies are listed 'Best First'.
Re^3: Prevent my STDERR logging in evals...
by ikegami (Patriarch) on May 08, 2008 at 00:05 UTC

    No, turning off warnings will not turn them off in called functions and won't mute explicit calls to warn.

    Yes, redirecting STDERR is another option (although /dev doesn't exist on my system).

    >perl -we"eval { local *STDERR; open(STDERR, '>', 'NUL'); print STDERR + qq{foo\n}; }" >