16 years agoRe-implementation. This uses a bit of Moose meta magic to get real singletons.
Shawn M Moore [Sun, 16 Dec 2007 15:21:03 +0000]
Re-implementation. This uses a bit of Moose meta magic to get real singletons.
The basic idea is you can now do:

package Moofty;
use MooseX::Singleton;
has 'config' => (is => 'rw', isa => 'HashRef');

package main;
my $moofty = Moofty->instance;
Moofty->config->{min_frob} = 10; # !!
print $moofty->config->{min_frob}; # 10

16 years agoDo a bit of fixing. instance and new are one and the same. More tests to ensure that...
Shawn M Moore [Sun, 16 Dec 2007 14:01:01 +0000]
Do a bit of fixing. instance and new are one and the same. More tests to ensure that this is so.

16 years agofuck Build.PL
Jonathan Rockway [Sat, 17 Nov 2007 05:47:06 +0000]
fuck Build.PL

17 years agoInitial commit of MooseX::Singleton and MooseX::Service
Anders Nor Berle [Fri, 20 Apr 2007 17:17:04 +0000]
Initial commit of MooseX::Singleton and MooseX::Service