Stories
Slash Boxes
Comments
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

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Tuesday September 12, 2006
04:24 AM

Class::Trait 0.21

[ #30967 ]

I was just sent a tarball from Roman Daniel. He fixed a heretofore unknown bug in Class::Trait whereby the class could not be profiled with Devel::DProf. I made one quick tweak to allow $class->does($class) to return true and uploaded the tarball.

0.21 Sep. 12, 2006
    - Converted Class::Trait::Config methods to be normal getter/setters, not
      lvalue methods.  lvalue methods prevent the code from being profiled
      via Devel::DProf.  Bug reported by Roman Daniel.  He also rewrote it to
      fix the problem.
    - Fixed bug where classes would report false for $class->does($class).
      Reported by chromatic.

Though you might not hear much about it, this is probably the module I get the most email about. Apparently, it's being used in production much more widely than I ever dreamed of.

See chromatic's review for a gentle introduction to traits (known as 'roles' in Perl 6).

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I even had Randy Kobes put the .20 version out in PPM because I think "traits" is a cool way to solve some OO problems. I guess I will now have to wait for the .21 version to get there. : )
    • Well, 0.20 is stable and works fine if you don't need Devel::DProf (there may be other issues with Devel modules, I don't know). Also, if you don't need $class->does($class) to return true, than 0.20 should be fine.

      That being said, if you have any issues with it, let me know!

      • I just went ahead and integrated it. Since there aren't any "binary" issues being a pure Perl module.

  • Composable Units of Object Behavior [oreillynet.com] is a fuller, more philosophical exploration of roles and their uses.