Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
Imagine a PracticalJoke class. It needs a non-lethal explode() from a Spouse role and a timed fuse() from a Bomb role. Unfortunately, each role provides the both methods. With Moose, this is trivial to resolve:
package PracticalJoke;
use Moose;
with 'Bomb' => { excludes => 'explode' };
'Spouse' => { excludes => 'fuse' };
How the heck do I do that with Perl 6? No matter how many times I read Synopsis 14, I can't figure out how that would work.
role Bomb {
method fuse () { say '3.. 2 .. 1 ..' }
method explode () { say 'Rock falls. Everybody dies!' }
}
role Spouse {
method fuse () { sleep rand(20); say "Now!" }
method explode () { say 'You worthless piece of junk! Why I should...' }
}
class PracticalJoke does Bomb does Spouse {
???
}
What have I missed?
spectests sugggest manual resolution (Score:1)
Reading the Synopsis and the role conflict spectest [pugscode.org] doesn't suggest anything other than resolving it yourself:
This type of divergence is worrying to me (Score:1)
Waiting on the Road to Eventually, I lost my Place On Line
Re: (Score:1)
Perl 6 is (in the realm of object orientation without question) even better and more pluggable than Perl 5, and you wonder that the default isn't is as good isn't as good as Perl 5 with a bunch of the best modules available?
I think thats an understandable position, but don't forget that Perl 6 leaves room for improvement. It shouldn't be all that hard to write a module that allows additional syntax like
class Foo does SomeRole