On Fri, Jul 25, 2008 at 05:47:30AM -0700, Carl Mäsak wrote: > $ svn info | grep Revi > Revision: 29734 > $ ./perl6 -e 'return' > No exception handler and no message > > This error message is strange, needlessly exposes internals, and > doesn't say where the error occurred. It could be more like Perl 5's > error message: > > $ perl -e 'return' > Can't return outside a subroutine at -e line 1.
Getting rakudo to do "Can't return outside a subroutine" is probably not too difficult, reporting the line number needs some work (see RT #53082 and #43269). I suspect that PCT will end up implementing a setfile/setline workaround, and that really should happen as part of the PGE refactor (so we can efficiently compute line numbers to be stored in the generated code). Pm