Fix RT bug #46086
[gitmo/MooseX-Singleton.git] / lib / MooseX / Singleton.pm
index fde0bf1..c982490 100644 (file)
@@ -1,13 +1,11 @@
 package MooseX::Singleton;
 
-use Moose 0.82 ();
+use Moose 1.10 ();
 use Moose::Exporter;
 use MooseX::Singleton::Role::Object;
 use MooseX::Singleton::Role::Meta::Class;
 use MooseX::Singleton::Role::Meta::Instance;
 
-our $VERSION = '0.22';
-$VERSION = eval $VERSION;
 
 Moose::Exporter->setup_import_methods( also => 'Moose' );
 
@@ -19,13 +17,15 @@ sub init_meta {
 
     my $caller = $p{for_class};
 
-    Moose::Util::MetaRole::apply_metaclass_roles(
-        for_class       => $caller,
-        metaclass_roles => ['MooseX::Singleton::Role::Meta::Class'],
-        instance_metaclass_roles =>
-            ['MooseX::Singleton::Role::Meta::Instance'],
-        constructor_class_roles =>
-            ['MooseX::Singleton::Role::Meta::Method::Constructor'],
+    Moose::Util::MetaRole::apply_metaroles(
+        for             => $caller,
+        class_metaroles => {
+            class => ['MooseX::Singleton::Role::Meta::Class'],
+            instance =>
+                ['MooseX::Singleton::Role::Meta::Instance'],
+            constructor =>
+                ['MooseX::Singleton::Role::Meta::Method::Constructor'],
+        },
     );
 
     Moose::Util::MetaRole::apply_base_class_roles(
@@ -40,14 +40,12 @@ sub init_meta {
 
 1;
 
+# ABSTRACT: turn your Moose class into a singleton
+
 __END__
 
 =pod
 
-=head1 NAME
-
-MooseX::Singleton - turn your Moose class into a singleton
-
 =head1 SYNOPSIS
 
     package MyApp;
@@ -110,12 +108,6 @@ C<bug-moosex-singleton@rt.cpan.org>, or through the web interface at
 L<http://rt.cpan.org>. We will be notified, and then you'll automatically be
 notified of progress on your bug as we make changes.
 
-=head1 AUTHORS
-
-Shawn M Moore E<lt>sartak@gmail.comE<gt>
-
-Dave Rolsky E<lt>autarch@urth.orgE<gt>
-
 =head1 SOME CODE STOLEN FROM
 
 Anders Nor Berle E<lt>debolaz@gmail.comE<gt>
@@ -124,12 +116,5 @@ Anders Nor Berle E<lt>debolaz@gmail.comE<gt>
 
 Ricardo SIGNES E<lt>rjbs@cpan.orgE<gt>
 
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 2007-2009 Infinity Interactive
-
-This program is free software; you can redistribute it and/or modify it under
-the same terms as Perl itself.
-
 =cut