Skip to content

Instantly share code, notes, and snippets.

@hoelzro
Created March 27, 2013 15:10
Show Gist options
  • Save hoelzro/5254952 to your computer and use it in GitHub Desktop.
Save hoelzro/5254952 to your computer and use it in GitHub Desktop.
multi trait_mod:<is>(Routine:D $r, :$pre-check) {
$r does role {
method postcircumfix:<( )>(|) {
say 'before';
my $result = callsame;
say 'after';
say "result = $result";
$result
}
}
}
sub mysub is pre-check {
say 'there';
17
}
mysub();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment