From: Shawn M Moore Date: Sat, 26 Jan 2008 16:54:03 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 0_37~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ccf49e80884ce57511f742a85791d368a372d893;p=gitmo%2FMoose.git --- diff --git a/Changes b/Changes index f7c38fc..1cb63ce 100644 --- a/Changes +++ b/Changes @@ -35,61 +35,26 @@ Revision history for Perl extension Moose Moose is now a postmodern object system :) - (see the POD for details) - - * <> - - this release contains a major reworking and - cleanup of the role system + + * <> + - this release contains a major reworking and + cleanup of the role system - 100% backwards compat. - Role application now restructured into seperate classes based on type of applicants - Role summation (combining of more than one role) - is much cleaner and anon-classes are no longer + is much cleaner and anon-classes are no longer used in this process - - new Composite role metaclass + - new Composite role metaclass - runtime application of roles to instances is now more efficient and re-uses generated classes when applicable - + * <> - - methods can now be excluded from a given role + - methods can now be excluded from a given role during composition - - with 'My::Role' => { excludes => [qw/method1 method2/] }; - - - methods can now be aliased to another name (and - still retain the original as well) - - with 'My::Role' => { - alias => { - method1 => method1_aliased - } - }; - - * <> - - allows arbitrary roles to be applied to attribute metaobjects - to allow better combination of custom attribute features. Docs - are coming soon for this feature. - - * <> - - added this new type which basically means the value is - of $type or it is undef - - ==== - - * Moose - Moose::Role - - now uses the Moose::Util::apply_all_roles to deal - with role application - - * Moose::Util - - added the &apply_all_roles function - - * Moose::Util::TypeConstraints - - all optimized type constraint subs are now - pulled from the Moose::Util::TypeConstraints::OptimizedConstraints - module (thanks to nothingmuch) - - improved support for the IO:: family of modules within the - FileHandle type constraint + - methods can now be aliased to another name (and + still retain the original as well) * Moose::Util::TypeConstraints::OptimizedConstraints - added this module (see above) @@ -107,13 +72,13 @@ Revision history for Perl extension Moose * Moose::Meta::Method::Accessor Moose::Meta::Method::Constructor Moose::Meta::Attribute - Moose::Meta::TypeConstraint - Moose::Meta::TypeCoercion - - lots of cleanup of such things as: + Moose::Meta::TypeConstraint + Moose::Meta::TypeCoercion + - lots of cleanup of such things as: - generated methods - type constraint handling - - error handling/messages - (thanks to nothingmuch) + - error handling/messages + (thanks to nothingmuch) * Moose::Meta::TypeConstraint::Parameterizable - added this module to support the refactor diff --git a/Makefile.PL b/Makefile.PL index 55eb1ac..2569da9 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -12,7 +12,7 @@ my $win32 = !! ( $^O eq 'Win32' or $^O eq 'cygwin' ); # prereqs requires 'Scalar::Util' => $win32 ? '1.17' : '1.18'; requires 'Carp'; -requires 'Class::MOP' => '0.52'; +requires 'Class::MOP' => '0.51'; requires 'Sub::Name' => '0.02'; requires 'Sub::Exporter' => '0.972'; diff --git a/lib/Moose/Meta/Attribute.pm b/lib/Moose/Meta/Attribute.pm index 960daf3..28c0b8b 100644 --- a/lib/Moose/Meta/Attribute.pm +++ b/lib/Moose/Meta/Attribute.pm @@ -9,7 +9,7 @@ use Carp 'confess'; use Sub::Name 'subname'; use overload (); -our $VERSION = '0.19'; +our $VERSION = '0.18'; our $AUTHORITY = 'cpan:STEVAN'; use Moose::Meta::Method::Accessor; @@ -405,10 +405,9 @@ sub install_accessors { $associated_class->add_method($handle => subname $name, sub { my $proxy = (shift)->$accessor(); @_ = ($proxy, @_); - - defined($proxy) - or confess "Undefined 'handles' for attribute '".$self->name."' for method '$name'."; - + (defined $proxy) + || confess "Cannot delegate $handle to $method_to_call because " . + "the value of " . $self->name . " is not defined"; goto &{ $proxy->can($method_to_call) || return }; }); } diff --git a/lib/Moose/Meta/Method/Constructor.pm b/lib/Moose/Meta/Method/Constructor.pm index b6ebe91..24c845d 100644 --- a/lib/Moose/Meta/Method/Constructor.pm +++ b/lib/Moose/Meta/Method/Constructor.pm @@ -7,7 +7,7 @@ use warnings; use Carp 'confess'; use Scalar::Util 'blessed', 'weaken', 'looks_like_number'; -our $VERSION = '0.07'; +our $VERSION = '0.05'; our $AUTHORITY = 'cpan:STEVAN'; use base 'Moose::Meta::Method',