Created
March 1, 2015 23:58
-
-
Save peschwa/ea19c808a7603e3fdddb 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 v6; | |
sub eval-lives($code) { | |
my $res = check-exception($code); | |
say $res; | |
} | |
sub check-exception($code) { | |
try { | |
EVAL $code; | |
} | |
$! | |
} | |
role StubB { ... }; role StubB { method foo { } }; | |
say "ok"; | |
eval-lives 'role StubB { ... }; role StubB { method foo { } };'; | |
say "ded :("; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment