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.
Why? (Score:2)
Just curious, why do you prefer OIO over Moose?
Re:Why? (Score:1)
As I said, it's merely a preference. There's nothing that I found so far that is a show-stopper or an overwhelming advantage for any of them. This being said...
The biggest plus of OIO, for me, is how inside-out objects ensure that colliding fields are not clobbered, but masked:
I know it's a little bit of a paranoid concern, and it creates a little bit more work (as you have to completly create two '@x's instead of overloading the one from Foo in Bar), but hey, it soothes the obsessive-compulsive in me. :-)
Another argument for OIO is that it claims to produces accessors that are faster than the ones of the usual blessed hash objects. Now, it must be said that I didn't benchmark that claim, so I can't vouch for it. Nor do I really need blinding speed for the stuff that I usually do. But just like the guy shopping for BBQs, I'm atavisticly drawn to the beast that boast the most BTUs. :-)
There is also the documentation. Moose's doc is getting good, but it's still a little bit scattered and hard to put together. OIO's, on the other hand, is very comprehensive. It's also a bit lenghty and hard to use a quick reference, but hopefully my cheatsheet is taking care of that problem.
And OIO can also play quite nicely with non-OIO objects. You can easily inherit of a blessed hash object (which could be a Moose object!), and a lot of the required magic will be done for you.
On the other hand, Moose does offer a couple of features that isn't in OIO (being able to slap 'before' and 'after' pieces of code around your parent class' methods, for example), but so far I didn't feel the need for them.
Reply to This
Parent