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.21';
-$VERSION = eval $VERSION;
Moose::Exporter->setup_import_methods( also => 'Moose' );
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(
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;
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>
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