From: Dave Rolsky Date: Sun, 21 Jun 2009 20:22:57 +0000 (-0500) Subject: bump version to 0.18 X-Git-Tag: 0.18~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ade9ece08d09a5a858e7978a970831f0f65ac3a4;p=gitmo%2FMooseX-Singleton.git bump version to 0.18 --- diff --git a/README b/README index cbd3de2..eba0a1b 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME MooseX::Singleton - turn your Moose class into a singleton VERSION - Version 0.16 + Version 0.18 SYNOPSIS package MyApp; diff --git a/lib/MooseX/Singleton.pm b/lib/MooseX/Singleton.pm index 1ba6342..7f37e50 100644 --- a/lib/MooseX/Singleton.pm +++ b/lib/MooseX/Singleton.pm @@ -5,7 +5,7 @@ use Moose::Exporter; use MooseX::Singleton::Object; use MooseX::Singleton::Meta::Class; -our $VERSION = '0.17'; +our $VERSION = '0.18'; $VERSION = eval $VERSION; Moose::Exporter->setup_import_methods( also => 'Moose' ); @@ -31,7 +31,7 @@ MooseX::Singleton - turn your Moose class into a singleton =head1 VERSION -Version 0.16, released 24 May 08 +Version 0.18, released 24 May 08 =head1 SYNOPSIS diff --git a/lib/MooseX/Singleton/Meta/Method/Constructor.pm b/lib/MooseX/Singleton/Meta/Method/Constructor.pm index f1dadde..01ea6f4 100644 --- a/lib/MooseX/Singleton/Meta/Method/Constructor.pm +++ b/lib/MooseX/Singleton/Meta/Method/Constructor.pm @@ -43,7 +43,7 @@ sub _initialize_body { defined $_ ? $_->_compiled_type_constraint : undef; } @type_constraints; - my $code = $self->_compile_code( + my ( $code, $e ) = $self->_compile_code( code => $source, environment => { '$meta' => \$self, @@ -51,7 +51,10 @@ sub _initialize_body { '@type_constraints' => \@type_constraints, '@type_constraint_bodies' => \@type_constraint_bodies, }, - ) or $self->throw_error("Could not eval the constructor :\n\n$source\n\nbecause :\n\n$@", error => $@, data => $source ); + ); + + $self->throw_error("Could not eval the constructor :\n\n$source\n\nbecause :\n\n$e", error => $e, data => $source ) + if $e; $self->{'body'} = $code; } diff --git a/t/003-immutable.t b/t/003-immutable.t index 39e45bd..e5a4047 100644 --- a/t/003-immutable.t +++ b/t/003-immutable.t @@ -39,7 +39,7 @@ BEGIN { $self->bag->{$key} += $value; } - +__PACKAGE__->meta->make_immutable; ::warning_is sub { __PACKAGE__->meta->make_immutable }, '', 'no warnings when calling make_immutable'; }