The Moose is loose

During my free moments today I started thinking about the structure of a configuration file generator I’m writing. It seemed obvious to me that it’s a good fit for some form of OO. Perl gives you a few good choices for building classes — manually, inside-out classes (a la Class::Std), meta-object protocols (Class::MOP comes to mind), and so on. After some reading I have tentatively decided that Moose may be the ticket.

To me it looks like the most natural fit. Many of the features seem to be inspired by CLOS, which I’m not intimately familiar with but have a basic knowledge of and respect for. It also seems to be inspired by the planned object system for Perl 6, which was really the deciding factor for me — when Perl 6 finally happens, I don’t want to have too much to catch up on.

The documentation is a little spread out for my taste (a separate POD with all of the documentation or a layout like Perl’s core POD would be heaps better), but I’ll make it through. I’d happily pay a dollar (or twenty) for a POD viewer with tabs (that doesn’t rely on conversion to HTML or somesuch).

I’ve got some very simple test code written and I’m exploring the various recipes in the Moose cookbook. If I get to know Moose well enough and I miraculously get a supply or round tuits I may throw together another recipe or two to help fill in the gaps.

Performance-wise it seems that the biggest penalty is in start-up, which is to be expected. I won’t be using it for CGIs, so that’s not a huge deal for me. I also noticed MooseX::Daemonize, which may come in handy depending on how I decide to make things work. Hopefully I’ll get a chance to do a bit more tomorrow.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s