I'm trying to include an external file on the fly from within some perl code, and I would also like to catch any "require" errors as well.
However, doing
eval{ require $somefile; }; if( $@ ) { print $@; }
only shows the top level error ( such as "Compilation failed in require at /foo/bar.pl" ). I want more detailed message, like "Global symbol $foo requires explicit package name at /blah.pl" type of messages as well.
How can I capture these messages from within Perl?
In reply to Capturing detailed error messages on 'require failure by lestrrat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |