Subject: | would like better errors from 'do filename' construct |
The Devel::REPL shell is nice in that it manages to be a more complete
and correct perl interpreter. However, in some cases, it would be nice
to have better diagnostics when running interactively. Specifically,
the 'do filename' construct gives no errors when filename fails to
compile. You can process the return value yourself, but it would be
nicer if the problem was indicated immediately in the shell.
Here is an example session with do where the file tries to use a
non-existent module named Bogus. I would like to see the compile error
message rather than just a quiet failure and looking for the false
return value to figure out something went wrong.
bash$ cat bogus
use Bogus;
1;
$ perl -c bogus
Can't locate Bogus.pm in @INC (@INC contains:
/usr/lib/perl5/5.10/i686-cygwin /usr/lib/perl5/5.10
/usr/lib/perl5/site_perl/5.10/i686-cygwin /usr/lib/perl5/site_perl/5.10
/usr/lib/perl5/vendor_perl/5.10/i686-cygwin
/usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/vendor_perl/5.10
/usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at bogus
line 1.
BEGIN failed--compilation aborted at bogus line 1.
bash$ re.pl
$ do 'bogus'
$