From: Dave Rolsky Date: Fri, 25 Dec 2009 15:54:41 +0000 (-0600) Subject: add version to all modules X-Git-Tag: 0.22~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5a0f3fa611c54cd665e49116d4dc9d5f305fde40;p=gitmo%2FMooseX-Singleton.git add version to all modules --- diff --git a/lib/MooseX/Singleton/Role/Meta/Class.pm b/lib/MooseX/Singleton/Role/Meta/Class.pm index fc8048b..0765f23 100644 --- a/lib/MooseX/Singleton/Role/Meta/Class.pm +++ b/lib/MooseX/Singleton/Role/Meta/Class.pm @@ -3,6 +3,9 @@ use Moose::Role; use MooseX::Singleton::Role::Meta::Instance; use MooseX::Singleton::Role::Meta::Method::Constructor; +our $VERSION = '0.21'; +$VERSION = eval $VERSION; + sub existing_singleton { my ($class) = @_; my $pkg = $class->name; diff --git a/lib/MooseX/Singleton/Role/Meta/Instance.pm b/lib/MooseX/Singleton/Role/Meta/Instance.pm index aa88684..938b907 100644 --- a/lib/MooseX/Singleton/Role/Meta/Instance.pm +++ b/lib/MooseX/Singleton/Role/Meta/Instance.pm @@ -2,6 +2,9 @@ package MooseX::Singleton::Role::Meta::Instance; use Moose::Role; use Scalar::Util 'weaken'; +our $VERSION = '0.21'; +$VERSION = eval $VERSION; + sub get_singleton_instance { my ( $self, $instance ) = @_; diff --git a/lib/MooseX/Singleton/Role/Meta/Method/Constructor.pm b/lib/MooseX/Singleton/Role/Meta/Method/Constructor.pm index f1eb90d..7005a44 100644 --- a/lib/MooseX/Singleton/Role/Meta/Method/Constructor.pm +++ b/lib/MooseX/Singleton/Role/Meta/Method/Constructor.pm @@ -1,6 +1,9 @@ package MooseX::Singleton::Role::Meta::Method::Constructor; use Moose::Role; +our $VERSION = '0.21'; +$VERSION = eval $VERSION; + override _initialize_body => sub { my $self = shift; diff --git a/lib/MooseX/Singleton/Role/Object.pm b/lib/MooseX/Singleton/Role/Object.pm index 67129ec..f419052 100644 --- a/lib/MooseX/Singleton/Role/Object.pm +++ b/lib/MooseX/Singleton/Role/Object.pm @@ -1,5 +1,9 @@ package MooseX::Singleton::Role::Object; use Moose::Role; +use Carp qw( carp ); + +our $VERSION = '0.21'; +$VERSION = eval $VERSION; sub instance { shift->new } diff --git a/t/001-basic.t b/t/001-basic.t index 12c0eb2..cca73b0 100644 --- a/t/001-basic.t +++ b/t/001-basic.t @@ -71,4 +71,4 @@ is( MooseX::Singleton::Test->distinct_keys, 0, "Package->clear works" ); MooseX::Singleton::Test->_clear_instance; $mst = $mst2 = undef; -is( MooseX::Singleton::Test->new->distinct_keys, 1, "back to the default" ); +is( MooseX::Singleton::Test->instance->distinct_keys, 1, "back to the default" );