X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Singleton.git;a=blobdiff_plain;f=lib%2FMooseX%2FSingleton.pm;h=cca77ffe93c60316cf2eb2c07c40e56547f97ea0;hp=bf7168d5a261decfc05523075a76fcb1107f323d;hb=f65df6a0f27f65528091206b099ddb402fcfa63a;hpb=911a9ddace47ef7d8d2725356b01eb6ac654756d diff --git a/lib/MooseX/Singleton.pm b/lib/MooseX/Singleton.pm index bf7168d..cca77ff 100644 --- a/lib/MooseX/Singleton.pm +++ b/lib/MooseX/Singleton.pm @@ -1,22 +1,24 @@ package MooseX::Singleton; -use Moose; + +use Moose (); +use Moose::Exporter; use MooseX::Singleton::Object; use MooseX::Singleton::Meta::Class; -our $VERSION = 0.08; - -sub import { - my $caller = caller; +our $VERSION = '0.09_02'; +$VERSION = eval $VERSION; - Moose::init_meta($caller, 'MooseX::Singleton::Object', 'MooseX::Singleton::Meta::Class'); +Moose::Exporter->setup_import_methods( also => 'Moose' ); - Moose->import({into => $caller}); - strict->import; - warnings->import; +sub init_meta { + shift; + Moose->init_meta( + @_, + base_class => 'MooseX::Singleton::Object', + metaclass => 'MooseX::Singleton::Meta::Class', + ); } -no Moose; - 1; __END__