Skip to content

Changing MooseX::SingletonMethod (a little bit!)

July 31, 2009

It never quite sat comfortably with me that MooseX::SingletonMethod name didn’t convey the fact it was a Moose role and not a Moose class module. Other MooseX modules on CPAN showed there was no requirement to be succinct in this distinction.

Still having posted my last little ditty on having role attached to Moose I thought I make some slight amendments to MooseX::SingletonMethod module to pull this slightly annoying thorn from my paw.

Version 0.02 will soon be on CPAN and now works either of these ways:

package Baz;
use MooseX::SingletonMethod;
...
no MooseX::SingletonMethod;
1;

or as a role:

package Baz;
use Moose;
with 'MooseX::SingletonMethod::Role';
...
no Moose;
1;

Hate to change API but MX::SM is only a a few weeks old so I’m hopeful that the hordes of users that use this module will understand 😉

/I3az/

Advertisement
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

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 )

Connecting to %s

%d bloggers like this: