Created
August 15, 2015 14:20
-
-
Save anonymous/89624af3959c7fb86c62 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
class A { | |
has $.data; | |
submethod BUILD(*@args) { | |
# | |
} | |
method foo() { | |
say "foo"; | |
} | |
} | |
class B { | |
has $.a handles <foo>; | |
submethod BUILD(*@args) { | |
$!a = A.new; | |
} | |
method bar() { | |
say "bar"; | |
} | |
} |
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
class C { | |
use B; | |
has $.b handles <bar foo>; | |
submethod BUILD(*@args) { | |
$!b = B.new; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment