Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created July 6, 2009 17:20
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 jnthn/141544 to your computer and use it in GitHub Desktop.
Save jnthn/141544 to your computer and use it in GitHub Desktop.
role doc { has Str $.doc is rw; }
multi trait_mod:<is>(&code, doc, $message) {
&code does doc($message);
}
sub drink($pints) is doc("A very important activity") {
say "glug" for 1..$pints;
}
drink(2);
say &drink.doc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment