Since my early Perl days decades ago, wow, it’s really more than a decade ago, probably two, since I started programming with Perl, I thought about OO style.
OK, frankly not in the first years, because the scripts were small and mastering the language the main challenge. But with time passing by the projects grew and the need for nice interfaces, clean and maintainable code grew as well.
At that time I simply did the normal Perl OO tutorial, unfortunately the Moose part was missing back then.
For quite a while I wanted to start using Moose and used it for rewriting a small project I had already done. Since I wasn’t very motivated and had other things to do, I stuck in the middle…
A new little project is about to grow and I thought about re-factoring it in the early stage. Another attempt to start over with Moose.
I checked out the Moose Manual and the Moose Cookbook as a starting point.
In fact I’m quite happy with it so far. I got rid of quite some boilerplate code, e.g.
sub new and parameter checking. This is all done Moose now.
I know that there are complains about Moose’s performance and the Mouse and Moo were invented meanwhile. However, it’s not really important for my project if it starts a bit slower or runs a bit longer. And since I started using Dist::Zilla the dependencies are no longer a problem, too.
So far I’m quite happy with Moose, we’ll see if this will be a long lasting relationship…