From: gfx Date: Mon, 19 Oct 2009 07:52:41 +0000 (+0900) Subject: Revert "Ignore fatal errors in "traits" resolution. This is a temporary change." X-Git-Tag: 0.40~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f3f04eedbd85d3990f290d3e8c329150663889d6;p=gitmo%2FMouse.git Revert "Ignore fatal errors in "traits" resolution. This is a temporary change." This reverts commit 341a3046743c9d5dc1d83c9ef878e9a9bb190587. --- diff --git a/lib/Mouse/Meta/Attribute.pm b/lib/Mouse/Meta/Attribute.pm index 71a2bbd..2d75d0e 100644 --- a/lib/Mouse/Meta/Attribute.pm +++ b/lib/Mouse/Meta/Attribute.pm @@ -214,21 +214,17 @@ sub interpolate_class{ my @traits; if(my $traits_ref = delete $args->{traits}){ - local $@; - eval{ - for (my $i = 0; $i < @{$traits_ref}; $i++) { - my $trait = Mouse::Util::resolve_metaclass_alias(Attribute => $traits_ref->[$i], trait => 1); + for (my $i = 0; $i < @{$traits_ref}; $i++) { + my $trait = Mouse::Util::resolve_metaclass_alias(Attribute => $traits_ref->[$i], trait => 1); - next if $class->does($trait); + next if $class->does($trait); - push @traits, $trait; + push @traits, $trait; - # are there options? - push @traits, $traits_ref->[++$i] - if ref($traits_ref->[$i+1]); - } - }; - warn "Fatal error in traits: $@" if _MOUSE_VERBOSE; + # are there options? + push @traits, $traits_ref->[++$i] + if ref($traits_ref->[$i+1]); + } if (@traits) { $class = Mouse::Meta::Class->create_anon_class(