From: Stevan Little Date: Thu, 27 Apr 2006 03:11:12 +0000 (+0000) Subject: mooose X-Git-Tag: 0_05~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5faf11bb7a85879045495ea71ac682bca7c977eb;p=gitmo%2FMoose.git mooose --- diff --git a/MANIFEST b/MANIFEST index b9b8e10..a1d433d 100644 --- a/MANIFEST +++ b/MANIFEST @@ -55,6 +55,7 @@ t/056_util_more_type_coercion.t t/100_subtype_quote_bug.t t/101_subtype_conflict_bug.t t/102_Moose_Object_error.t +t/103_subclass_use_base_bug.t t/pod.t t/pod_coverage.t t/lib/Bar.pm diff --git a/lib/Moose/Meta/Class.pm b/lib/Moose/Meta/Class.pm index b9b54c7..4039af5 100644 --- a/lib/Moose/Meta/Class.pm +++ b/lib/Moose/Meta/Class.pm @@ -47,8 +47,8 @@ sub new_object { my ($class, %params) = @_; my $self = $class->SUPER::new_object(%params); foreach my $attr ($class->compute_all_applicable_attributes()) { - next unless $params{$attr->name} && $attr->can('has_trigger') && $attr->has_trigger; - $attr->trigger->($self, $params{$attr->name}, $attr); + next unless $params{$attr->init_arg} && $attr->can('has_trigger') && $attr->has_trigger; + $attr->trigger->($self, $params{$attr->init_arg}, $attr); } return $self; } diff --git a/t/001_basic.t b/t/001_basic.t index 71784eb..9fd1256 100644 --- a/t/001_basic.t +++ b/t/001_basic.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 56; +use Test::More tests => 55; use Test::Exception; BEGIN { @@ -129,7 +129,7 @@ is_deeply( [ 'Moose::Object' ], '... Point got the automagic base class'); -my @Point_methods = qw(meta x y clear); +my @Point_methods = qw(x y clear); my @Point_attrs = ('x', 'y'); is_deeply(