caller.throw('an error');
Could this:
throw('an error');
just be another way to say:
$?BLOCK.throw('an error');
?
The mechanism Carp has for throwing exceptions from further down the
call stack seems a bit clunky. The above would mean we could do:
(caller Method, :skip(2)).throw('an error');
and possibly
# use a closure to search back through the call stack
throw_from({.package !~ $OUTER::?package}, 'an error');
Does this make any sense? Apologies if any of this has been discussed before.
Tom