Initial commit of MooseX::Singleton and MooseX::Service
[gitmo/MooseX-Singleton.git] / t / singleton.t
CommitLineData
443f4253 1use Test::More tests => 2;
2
3use strict;
4use warnings;
5
6{
7 package Foo::Singleton;
8
9 use Moose;
10
11 has gravy => (is => 'rw');
12
13 with qw/MooseX::Singleton/;
14}
15
16ok (Foo::Singleton->new,'new');
17
18my $foo = Foo::Singleton->instance;
19
20my $bar = Foo::Singleton->instance;
21
22$foo->gravy ('sauce');
23
24is ($bar->gravy,'sauce','singleton');
25