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.
In reply to Re: Executing code block in memory
by kennethk
in thread Executing code block in memory
by morissette
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |