Created
July 3, 2009 23:06
-
-
Save jnthn/140363 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
glug | |
glug | |
A very important activity |
This file contains hidden or 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