Skip to content

Instantly share code, notes, and snippets.

@autarch
Created June 18, 2016 22:18
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 autarch/9af544579d70a205c6261f4bf8a358f5 to your computer and use it in GitHub Desktop.
Save autarch/9af544579d70a205c6261f4bf8a358f5 to your computer and use it in GitHub Desktop.
# sample(main)
multi trait_mod:<is>(Method $method, :$annoying!) {
$method.wrap( { say "Thank you for calling {$method.name}!"; callsame } );
}
class Dog {
method bark is annoying { say 'woof' }
}
Dog.new.bark
# end-sample
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment