Created
April 28, 2013 14:35
-
-
Save kuzuha/5477051 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
./perl6 | |
> class t{} | |
t() | |
> role r{method hello{say 'hello'}} | |
r() | |
> class t_r does r {} | |
t_r() | |
> t_r.new().hello() | |
hello | |
> (t.new does r).hello() | |
hello | |
> t.new.^add_role(r).hello() | |
hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment