Subject: | namespace::clean suppresses compilation errors... |
I've been having a lot of problems lately with "Unknown Error" getting
reported rather than the actual error message when using namespace::clean.
I've managed to narrow it down to this minimal test case... (I also
forked it on github and added a testcase there)
package Test1;
use namespace::clean;
sub foo { if } # intentional syntax error
1;
If you remove the call to 'use namespace::clean', this is the output
(which is what I would expect)
syntax error at lib/Test1.pm line 2, near "if }"
Compilation failed in require.
BEGIN failed--compilation aborted.
However, when using namespace::clean, the output becomes:
Unknown error
Compilation failed in require.
BEGIN failed--compilation aborted.
--
www.jasonkohles.com