Created
July 6, 2009 17:20
-
-
Save jnthn/141544 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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