From: Stevan Little Date: Tue, 29 Apr 2008 06:02:36 +0000 (+0000) Subject: fixing stuff X-Git-Tag: 0_55~204 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cbd141ca4006727c9fe42b0a6784ffefe32aa9b7;p=gitmo%2FMoose.git fixing stuff --- diff --git a/Changes b/Changes index 0731fba..a3a1ae5 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,14 @@ Revision history for Perl extension Moose +0.43 + * NOTE TO SELF: + drink more coffee before + doing release engineering + + - whoops, forgot to do the smolder tests, + and we broke some of the custom meta-attr + modules. This fixes that. + 0.42 Mon. April 28, 2008 - some bad tests slipped by, nothing else changed in this release (cpantesters++) diff --git a/lib/Moose.pm b/lib/Moose.pm index eb06efb..8776106 100644 --- a/lib/Moose.pm +++ b/lib/Moose.pm @@ -4,7 +4,7 @@ package Moose; use strict; use warnings; -our $VERSION = '0.42'; +our $VERSION = '0.43'; our $AUTHORITY = 'cpan:STEVAN'; use Scalar::Util 'blessed', 'reftype'; diff --git a/lib/Moose/Meta/Attribute.pm b/lib/Moose/Meta/Attribute.pm index 7ff7596..0b4af49 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.22'; +our $VERSION = '0.23'; our $AUTHORITY = 'cpan:STEVAN'; use Moose::Meta::Method::Accessor; @@ -154,13 +154,19 @@ sub clone_and_inherit_options { delete $options{does}; } - ( $actual_options{metaclass}, my @traits ) = $self->interpolate_class(%options); + # NOTE: + # this doesn't apply to Class::MOP::Attributes, + # so we can ignore it for them. + # - SL + if ($self->can('interpolate_class')) { + ( $actual_options{metaclass}, my @traits ) = $self->interpolate_class(%options); - my %seen; - my @all_traits = grep { $seen{$_}++ } @{ $self->applied_traits || [] }, @traits; - $actual_options{traits} = \@all_traits if @all_traits; + my %seen; + my @all_traits = grep { $seen{$_}++ } @{ $self->applied_traits || [] }, @traits; + $actual_options{traits} = \@all_traits if @all_traits; - delete @options{qw(metaclass traits)}; + delete @options{qw(metaclass traits)}; + } (scalar keys %options == 0) || confess "Illegal inherited options => (" . (join ', ' => keys %options) . ")";