Skip to content

Instantly share code, notes, and snippets.

@leedo

leedo/A.pm Secret

Last active November 28, 2015 16:08
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 leedo/7603df457e182976295e to your computer and use it in GitHub Desktop.
Save leedo/7603df457e182976295e to your computer and use it in GitHub Desktop.
use v6;
class A {
use B;
has B $.b;
method run {
$.b.dispatch(self);
}
}
use v6;
class A { ... }
class B {
method dispatch (A $a) {
say $a;
}
}
leedo@zaphod:~/src$ perl6 -I. test.pl
===SORRY!=== Error while compiling /home/leedo/src/B.pm
The following packages were stubbed but not defined:
A
at /home/leedo/src/B.pm:9
------> <BOL>⏏<EOL>
expecting any of:
statement end
from :4
from test.pl:5
#!/usr/bin/env perl6
use v6;
use A;
my $a = A.new;
$a.run;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment