Skip to content

Instantly share code, notes, and snippets.

@hoelzro
Created Mar 27, 2013
Embed
What would you like to do?
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