Don't use the instance method directly from Object -- use meta->construct_instance
Shawn M Moore [Sun, 16 Dec 2007 19:21:05 +0000 (19:21 +0000)]
lib/MooseX/Singleton/Meta/Instance.pm

index b78953c..c0dbc91 100644 (file)
@@ -16,7 +16,7 @@ sub get_singleton_instance {
     no strict 'refs';
     return ${"$instance\::singleton"} if defined ${"$instance\::singleton"};
 
-    return $instance->instance;
+    return $instance->meta->construct_instance;
 }
 
 sub clone_instance {