in reply to Executing code block in memory
From my perspective, it would be easier to just redirect STDERR to STDOUT (or perhaps to an in-memory scalar), since warnings bypass the normal $@ error capture in eval. There are instructions for redirecting STDERR in open. You could also modify the $SIG{__WARN__} handler (see %SIG in perlvar). Or, as long as you've tossed security to the wind, maybe you could achieve your goal with CGI::Carp qw(fatalsToBrowser);?
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Executing code block in memory
by morissette (Novice) on Aug 08, 2012 at 21:39 UTC | |
by kennethk (Abbot) on Aug 08, 2012 at 22:18 UTC |