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
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
list as object (Score:1)
That would be List::oo.
But Class::Accessor::Classy should do what you want without even needing to write the add_args() method.
Re:list as object (Score:2)
List::oo does look very similar to what I want, except that I want is simply to have all the the ease of use of objects for arrays and hashes (maybe scalars?) without the messiness. Also, by using nicely de-coupled functions to build things, I wouldn't have to "buy into" a particular object system. This would work with Moose as well as with hand-rolled code (which is why Class::Accessor::Classy doesn't seem like the right fit for me).
Reply to This
Parent
Re: (Score:1)
"All the ease of use of objects without the messiness"? What's the messy part? List::oo blesses an arrayref, so you're never far from punching through the abstraction. If the constructor is the messy part, then you have L().
Or do you mean cognitive messiness? Abstraction layers do tend to be abstract, and everything's a waterbed, so...
As for object systems - C::A::Classy really isn't much of one. And that is intentional. I'm not sure what the benefit of de-coupling is supposed to be - you get to write