Created
August 3, 2015 08:01
-
-
Save yuki-takeichi/706e8b823f32d36ad717 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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