Skip to content

Instantly share code, notes, and snippets.

@JEEN
Created May 30, 2011 05:46
Show Gist options
  • Save JEEN/998501 to your computer and use it in GitHub Desktop.
Save JEEN/998501 to your computer and use it in GitHub Desktop.
use Try::Tiny;
print yell();
sub shout {
die "AAA";
}
sub yell {
my ($cat) = @_;
try {
shout();
} catch {
warn "WTF?";
return 0;
};
return 1;
}
__END__
$ perl try-tiny.pl
WTF? at try-tiny.pl line 14.
1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment