Showing posts from December, 2009

Perl Foundations Event Mailing List

Go, subscribe and be happy with Perl events.

Good to see the Perl Foundation getting more active.


Mouse and Moose in Perl - Walking in a winter wonderland... kinda

I like Moose but I work heavily in non-persistent applications. Sadly this makes Moose's start up expense too much.

But recently I revisited Mouse (thanks to a friend). The last time I looked at it, I misread the documentation and it sounds like it was no longer being supported by the original developer. But not anymore, w00t!

The one part I really like about Mouse (and Moose) is the declarative nature of creating accessors (and therefore attributes). I really like this because it reduces the number of simple accessor tests that you need to write (saving time, tendium and kittens).

I used to use Class::Accessor but I always ran into inheritance and validation issues (which I used Params::Validate but this caused lots of custom magic for inheritance).

I think the Mouse/Moose syntax is significantly cleaner.

Compare Class::Accessor:package User; use strict; use warnings; use Carp; use base qw( Class::Accessor ); __PACKAGE__->mk_accessors( qw( id username password first_name …