1 use Test::More tests => 4;
7 package Foo::Singleton;
10 with qw/MooseX::Singleton/;
12 has gravy => (is => 'rw');
15 my $ante = Foo::Singleton->instance;
17 ok(Foo::Singleton->new,'new');
19 my $foo = Foo::Singleton->instance;
20 my $bar = Foo::Singleton->instance;
21 my $baz = Foo::Singleton->new;
25 is($bar->gravy,'sauce','singleton');
26 is($baz->gravy,'sauce','singleton');
27 is($ante->gravy,'sauce','singleton');