From: Stevan Little Date: Wed, 6 Sep 2006 05:22:40 +0000 (+0000) Subject: misc junk X-Git-Tag: 0_14~14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e95c7c42186441314d04af44f7e65562772d9d83;p=gitmo%2FMoose.git misc junk --- diff --git a/Changes b/Changes index df4cb35..da21afd 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,14 @@ Revision history for Perl extension Moose +0.13 + * Moose::Cookbook + - added a FAQ and WTF files to document frequently + asked questions and common problems + + * Moose::Meta::TypeCoercion + - properly capturing error when type constraint + is not found + 0.12 Sat. Sept. 1, 2006 * Moose::Cookbook - Recipe5 (subtypes & coercion) has been written diff --git a/MANIFEST b/MANIFEST index 6b861d4..f6ed41e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -9,6 +9,8 @@ lib/Moose.pm lib/Moose/Cookbook.pod lib/Moose/Object.pm lib/Moose/Role.pm +lib/Moose/Cookbook/FAQ.pod +lib/Moose/Cookbook/WTF.pod lib/Moose/Cookbook/Recipe1.pod lib/Moose/Cookbook/Recipe2.pod lib/Moose/Cookbook/Recipe3.pod diff --git a/README b/README index e9cb7f0..f94b90c 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -Moose version 0.12 +Moose version 0.13 =========================== See the individual module documentation for more information diff --git a/lib/Moose.pm b/lib/Moose.pm index 89b5bab..80204a9 100644 --- a/lib/Moose.pm +++ b/lib/Moose.pm @@ -4,7 +4,7 @@ package Moose; use strict; use warnings; -our $VERSION = '0.12'; +our $VERSION = '0.13'; use Scalar::Util 'blessed', 'reftype'; use Carp 'confess'; diff --git a/lib/Moose/Meta/TypeCoercion.pm b/lib/Moose/Meta/TypeCoercion.pm index ef6d680..5193cdb 100644 --- a/lib/Moose/Meta/TypeCoercion.pm +++ b/lib/Moose/Meta/TypeCoercion.pm @@ -10,7 +10,7 @@ use Carp 'confess'; use Moose::Meta::Attribute; use Moose::Util::TypeConstraints (); -our $VERSION = '0.01'; +our $VERSION = '0.02'; __PACKAGE__->meta->add_attribute('type_coercion_map' => ( reader => 'type_coercion_map', @@ -41,10 +41,13 @@ sub compile_type_coercion { my @coercions; while (@coercion_map) { my ($constraint_name, $action) = splice(@coercion_map, 0, 2); - my $constraint = Moose::Util::TypeConstraints::find_type_constraint($constraint_name)->_compiled_type_constraint; - (defined $constraint) - || confess "Could not find the type constraint ($constraint_name)"; - push @coercions => [ $constraint, $action ]; + my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint($constraint_name); + (defined $type_constraint) + || confess "Could not find the type constraint ($constraint_name) to coerce from"; + push @coercions => [ + $type_constraint->_compiled_type_constraint, + $action + ]; } $self->_compiled_type_coercion(sub { my $thing = shift;