-#!/usr/bin/env perl
package MooseX::Singleton::Role::Meta::Class;
use Moose::Role;
-use MooseX::Singleton::Meta::Instance;
-use MooseX::Singleton::Meta::Method::Constructor;
+use MooseX::Singleton::Role::Meta::Instance;
+use MooseX::Singleton::Role::Meta::Method::Constructor;
+
+our $VERSION = '0.25';
+$VERSION = eval $VERSION;
sub existing_singleton {
my ($class) = @_;
no strict 'refs';
# create exactly one instance
- if (defined ${"$pkg\::singleton"}) {
+ if ( defined ${"$pkg\::singleton"} ) {
return ${"$pkg\::singleton"};
}
return ${"$pkg\::singleton"} = super;
};
-no Moose;
+no Moose::Role;
1;