Skip to content

Instantly share code, notes, and snippets.

@tadzik
Created November 27, 2012 21:11
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 tadzik/4157041 to your computer and use it in GitHub Desktop.
Save tadzik/4157041 to your computer and use it in GitHub Desktop.
role MyRole {
has $!a
}
class MyClass does MyRole {
method new($arg) {
self.bless(*, :a($arg))
}
method a {
return $!a
}
}
MyClass.new(5).a.say
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment