|go ahead... be a heretic|
Object oriented Perl: What's popular?by amarquis (Curate)
|on Feb 01, 2008 at 15:58 UTC||Need Help??|
amarquis has asked for the
wisdom of the Perl Monks concerning the following question:
Objects in Perl are my nemesis. It is the one place in Perl where there seem to be too many options, and, in the past, I've just avoided dealing with it.
While learning Perl, I went through the relevant chapters in Programming Perl, perldoc perlboot, perltoot, and perlobj, and tutorials like Tutorial: Introduction to Object Oriented Programming here. All was well and good, I knew how to use the object interfaces of other modules, and my scripts were so small in size and scope that I didn't need to go OO myself. I was writing all of my "heavy" stuff in Java.
I'm currently starting to build a large-ish web application in Perl that is a great candidate for an OO style, and I've been looking at my options. The Cookbook pointed me towards various neat-looking CPAN helper modules, and that spurred me to go poke around CPAN on my own.
There's too much there! From "the whole package" object systems to little mix-and-match helpers in the Class namespace, there seem to be millions of choices.
Based on my search, I'm leaning towards Moose. It's simple, I like the features it supports, and in many cases it makes objects work more like I expect them to work.
The incredible array of options made wonder what other people choose, both out of curiosity and to hear about modules I've not yet explored. So, when you are creating an OO style application in Perl, what tools do you reach for to make the job easier?