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) = @_;
my $pkg = $class->name;
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;