use MooseX::Singleton::Role::Meta::Instance;
use MooseX::Singleton::Role::Meta::Method::Constructor;
+our $VERSION = '0.21';
+$VERSION = eval $VERSION;
+
sub existing_singleton {
my ($class) = @_;
my $pkg = $class->name;
use Moose::Role;
use Scalar::Util 'weaken';
+our $VERSION = '0.21';
+$VERSION = eval $VERSION;
+
sub get_singleton_instance {
my ( $self, $instance ) = @_;
package MooseX::Singleton::Role::Meta::Method::Constructor;
use Moose::Role;
+our $VERSION = '0.21';
+$VERSION = eval $VERSION;
+
override _initialize_body => sub {
my $self = shift;
package MooseX::Singleton::Role::Object;
use Moose::Role;
+use Carp qw( carp );
+
+our $VERSION = '0.21';
+$VERSION = eval $VERSION;
sub instance { shift->new }
MooseX::Singleton::Test->_clear_instance;
$mst = $mst2 = undef;
-is( MooseX::Singleton::Test->new->distinct_keys, 1, "back to the default" );
+is( MooseX::Singleton::Test->instance->distinct_keys, 1, "back to the default" );