[oak perl] Review of Ruby Pocket Reference
Quinn Weaver
quinn at fairpath.com
Fri Sep 7 09:35:03 PDT 2007
On Mon, Aug 27, 2007 at 12:58:23AM -0700, Steve K wrote:
> PS: I'm thinking about making Moose my favorite Perl module. It
> implements perl objects with a clean new syntax that hides the instance
> hashes and reference/dereference fog generators. Hard as heck to get
> it installed, but very pleasing one you get it in.
I have similar love for Object::InsideOut (except that it's easy to install).
It lets you declaratively declare the members of your class, and auto-
generates accessors, modifiers, and a constructor (with hashref "named args").
Similarly, it lets you declare the required and optional args to your
methods--even their types or regexes--and checks them at run-time.
It does all this using :attributes that you stick on your methods/variables--
not source filters. And it's thread-safe. Definitely worth checking out.
It's sad that we're even discussing the myriad ways to do objects with Perl,
but, IMO, Object::InsideOut has finally nailed the problem.
--
Quinn Weaver, independent contractor | President, San Francisco Perl Mongers
http://fairpath.com/quinn/resume/ | http://sf.pm.org/
510-520-5217
More information about the Oakland
mailing list