Moose no more

After a while spent trying to learn Moose I’ve come to realise that it’s just not a good fit for what I want to do. It’s unfortunate — I quite like it, and it saves a lot of time otherwise spent scaffolding. It has other benefits as well, but there are a few things I can’t get it to understand without quite a bit of extra work.

I am using Set::Object a lot in some code I’m writing, and I can’t get Moose to work well with attributes of this type. Moose complains that instances of Set::Object don’t pass the type constraint _ANON_. I got it partially working using lots of absolutely horrendous code, but that’s not how I want to spend my time.

For now I just used Module::Starter and regular Perl OO to get me back on my feet and got the code that failed to work with Moose rewritten and working, with POD and tests. It wasn’t a lot of code and certainly wasn’t complicated.

Hopefully one day I’ll find the time to re-explore Moose. But until then, the Moose can go to pasture for me.

Advertisements

2 responses to “Moose no more

  1. stevanlittle

    I am sorry to hear you had such issues with Moose, you should have posted to the mailing list or joined us on IRC, I suspect we could have saved you some time as we have a very nice and helpful community developing right now.

    As for the Set::Object problem, the __ANON__ type constraint is one that is auto-generated for you when one of that name does not already exist. Without seeing your code I cannot tell why this was happening though. However, the recently released MooseX::Types::Set::Object might be able to help you.

  2. I’ll be the first to admit that I’m bad at following up with the community when I run into problems. I may well take you up on that when I turn my attention back to the project I was working on.

    The synopsis for MooseX::Types::Set::Object looks like it would do pretty much what I want it to do. I’ll give it a go when I get a few tuits.

    By the way, thanks for your feedback — it’s good to see module authors following up like this. If I ever release something of substance I hope to do the same.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s