Created
April 13, 2011 21:17
-
-
Save jasonmay/918438 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 Foo::Baz { | |
method bop() { say "bop!" } | |
} |
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
===SORRY!=== | |
Illegal redeclaration of symbol 'Foo' |
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
use Foo::Baz; | |
class Foo { | |
method hello() { Foo::Baz.new.bop() } | |
} |
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
use Foo; | |
my Foo $foo .= new; | |
$foo.hello(); |
(literally the elipsis and everything -- currently a workaround for a rakudobug)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This works if you put "class Foo { ... }" at the top of Foo.pm6. @masak++