Skip to content

Instantly share code, notes, and snippets.

@zoffixznet

zoffixznet/p6.p6 Secret

Created December 15, 2016 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoffixznet/9acb9b7036bacea3037ef9d70b10e9a4 to your computer and use it in GitHub Desktop.
Save zoffixznet/9acb9b7036bacea3037ef9d70b10e9a4 to your computer and use it in GitHub Desktop.
use nqp;
my $t = {warn "warning"; warn "second warning"; take 42; last; };
say eager do gather {
for ^3 {
my $control-ex;
for ^3 {
say "meow";
$t();
CONTROL {
when CX::Last | CX::Next | CX::Redo {
$control-ex = $_; .rethrow;
}
}
}
$control-ex and $control-ex.rethrow;
say "fail";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment