X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FAttribute.pm;fp=lib%2FMouse%2FMeta%2FAttribute.pm;h=10a94502366c8afdd9eeb37ed0ac6fe215a67b03;hp=a66fb320c78a580186518ee1b7a61cdfb08d53e3;hb=431e4817af5380b349d562cafde91777db982a2a;hpb=81c629ebda18684a5bc69906308113423a7a58b4 diff --git a/lib/Mouse/Meta/Attribute.pm b/lib/Mouse/Meta/Attribute.pm index a66fb32..10a9450 100644 --- a/lib/Mouse/Meta/Attribute.pm +++ b/lib/Mouse/Meta/Attribute.pm @@ -44,6 +44,8 @@ my %valid_options = map { $_ => undef } ( 'curries', ); +our @CARP_NOT = qw(Mouse::Meta::Class); + sub new { my $class = shift; my $name = shift; @@ -76,10 +78,9 @@ sub new { # (3) bad options found if(@bad){ - @bad = sort @bad; - local $Carp::Internal{'Mouse'} = 1; - local $Carp::Internal{'Mouse::Meta::Class'} = 1; - Carp::carp("Found unknown argument(s) passed to '$name' attribute constructor in '$class': @bad"); + Carp::carp( + "Found unknown argument(s) passed to '$name' attribute constructor in '$class': " + . Mouse::Util::english_list(@bad)); } my $self = bless $args, $class;