Created
November 27, 2012 21:13
-
-
Save tadzik/4157055 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 MyRole { | |
has $!a; | |
method accessor { $!a } | |
} | |
class MyClass does MyRole { | |
method new($arg) { | |
self.bless(*, :a($arg)) | |
} | |
} | |
say MyClass.new(3).accessor; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment