X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FSingleton.pm;h=71c6f3a3fdc893d0c60cfd380eccd389784c7fa1;hb=7ec24bbf5086683c512c48a83be4140345dfda70;hp=bf7168d5a261decfc05523075a76fcb1107f323d;hpb=911a9ddace47ef7d8d2725356b01eb6ac654756d;p=gitmo%2FMooseX-Singleton.git diff --git a/lib/MooseX/Singleton.pm b/lib/MooseX/Singleton.pm index bf7168d..71c6f3a 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.11'; +$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__