suaveant has asked for the wisdom of the Perl Monks concerning the following question:
When an there is an error in an eval, like: $a=10; eval {$a->isa('foo')}; I actually get the error message printed to my error log, even though Perl normally wouldn't print such a message, only store it in $@.
Is there some easy way to catch the fact I'm in an eval so I can suppress writing the message to the error file?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Prevent my STDERR logging in evals...
by moritz (Cardinal) on May 07, 2008 at 21:33 UTC | |
|
Re: Prevent my STDERR logging in evals...
by ikegami (Patriarch) on May 07, 2008 at 22:27 UTC | |
by chromatic (Archbishop) on May 07, 2008 at 23:58 UTC | |
by ikegami (Patriarch) on May 08, 2008 at 00:05 UTC | |
|
Re: Prevent my STDERR logging in evals...
by Old_Gray_Bear (Bishop) on May 07, 2008 at 22:59 UTC | |
by ikegami (Patriarch) on May 08, 2008 at 00:11 UTC | |
|
Re: Prevent my STDERR logging in evals...
by mscharrer (Hermit) on May 07, 2008 at 21:25 UTC | |
by ikegami (Patriarch) on May 07, 2008 at 22:23 UTC | |
by suaveant (Parson) on May 08, 2008 at 14:36 UTC |