Exception-Resumable
view release on metacpan or search on metacpan
Resumable.pm view on Meta::CPAN
{ exception_5 => 1, exception_6 => 1 } => sub { ... };
=cut
$VERSION = '0.91';
require Exporter;
@ISA = 'Exporter';
@EXPORT = qw(handle raise);
sub handle(&@)
{
my $body = shift;
local @LAST_CATCH = @CATCH;
local @CATCH = (@_, @CATCH);
local (@_);
if (wantarray) {
my @ret = eval { $body->() };
if ($@) {
raise(ref($@) eq 'ARRAY' ? @{$@} : $@);
} else {
( run in 0.791 second using v1.01-cache-2.11-cpan-49f99fa48dc )