Skip to content

Instantly share code, notes, and snippets.

@jasonmay
Created April 13, 2011 21:17
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 jasonmay/918438 to your computer and use it in GitHub Desktop.
Save jasonmay/918438 to your computer and use it in GitHub Desktop.
class Foo::Baz {
method bop() { say "bop!" }
}
===SORRY!===
Illegal redeclaration of symbol 'Foo'
use Foo::Baz;
class Foo {
method hello() { Foo::Baz.new.bop() }
}
use Foo;
my Foo $foo .= new;
$foo.hello();
@jasonmay
Copy link
Author

This works if you put "class Foo { ... }" at the top of Foo.pm6. @masak++

@jasonmay
Copy link
Author

(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