Ricardo SIGNES [Sat, 26 Jan 2008 14:49:33 +0000]
do not allow double initialization
Shawn M Moore [Sun, 16 Dec 2007 19:21:20 +0000]
Documentation and little fixes. This one (0.03) is heading to CPAN
Shawn M Moore [Sun, 16 Dec 2007 19:21:05 +0000]
Don't use the instance method directly from Object -- use meta->construct_instance
Shawn M Moore [Sun, 16 Dec 2007 19:11:16 +0000]
Optimization: it's really slow to go through new_object for every access so
return the singleton if we see it already exists, which it will every
single except the first.
It's not particularly Moosey but it'll do for a first CPAN release.
Shawn M Moore [Sun, 16 Dec 2007 16:23:23 +0000]
Move actual singleton logic out of MooseX::Singleton::Object and into MooseX::Singleton::Meta::Class.
Shawn M Moore [Sun, 16 Dec 2007 16:18:54 +0000]
Rename Meta::Instance->instantiate to Meta::Instance->get_singleton_instance.
Test that default values are set.
Meta::Instance->clone_instance (which is more or less a no-op)
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
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.
Jonathan Rockway [Sat, 17 Nov 2007 05:47:06 +0000]
fuck Build.PL
Anders Nor Berle [Fri, 20 Apr 2007 17:17:04 +0000]
Initial commit of MooseX::Singleton and MooseX::Service