Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I'm waiting to see what shakes out of A12 before I do much more work on it. Very few people really understand the point of roles; I hope that Larry will explain it far better than I've been able to do.

    • I don't blame you. It looks like there's a lot of potential there, but how it integrates into Perl 6 will be interesting.

      I just finished an alpha version of Class::Trait and I'm writing the docs now. I don't have a tarball uploaded, but the interface looks like this (borrowing heavily from your examples):

      package Person;
      # make them a lifeguard, but ensure that they use &Trait::Dog::swim and not
      # &Trait::LifeGuard::swim
      use Class::Trait 'Trait::LifeGuard';
      use Class::Trait 'Trait::Dog' => { exp

    • I forgot to mention that since I don't know how Perl 6 roles are to be implemented, my design goals were driven by my understanding of the original traits document. That's one of the reasons why I call them "traits" instead of "roles". I've thought about uploading this to the CPAN, but I have two concerns. First, I don't want to cause potential confusion when Perl 6 comes out. Second, since there are already beginning implementations of roles, I don't necessarily want to provide competing modules unless