projects
/
gitmo/MooseX-Singleton.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Move actual singleton logic out of MooseX::Singleton::Object and into MooseX::Singlet...
[gitmo/MooseX-Singleton.git]
/
lib
/
MooseX
/
Singleton
/
Object.pm
diff --git
a/lib/MooseX/Singleton/Object.pm
b/lib/MooseX/Singleton/Object.pm
index
dc04e2f
..
08a4926
100644
(file)
--- a/
lib/MooseX/Singleton/Object.pm
+++ b/
lib/MooseX/Singleton/Object.pm
@@
-7,17
+7,6
@@
extends 'Moose::Object';
no strict 'refs';
-override new => sub {
- my $class = shift;
-
- # create exactly one instance
- if (!defined ${"$class\::singleton"}) {
- ${"$class\::singleton"} = super;
- }
-
- return ${"$class\::singleton"};
-};
-
sub instance { shift->new }
1;