Skip to content

Instantly share code, notes, and snippets.

@yuki-takeichi
Created August 3, 2015 08:01
Show Gist options
  • Save yuki-takeichi/706e8b823f32d36ad717 to your computer and use it in GitHub Desktop.
Save yuki-takeichi/706e8b823f32d36ad717 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use Exception::Tiny;
use Try::Tiny qw/try catch finally/;
sub hoge {
return try {
Exception::Tiny->throw({hoge => 'foo'});
return 'hogehoge';
} catch {
return 'foobar';
} finally {
print "finally!!!!\n";
};
}
print hoge;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment