# (3) bad options found
if(@bad){
@bad = sort @bad;
- Carp::cluck("Found unknown argument(s) passed to '$name' attribute constructor in '$class': @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");
}
my $self = bless $args, $class;
$attribute->create($metaclass, $attribute->name, %{$attribute});
}
- if(!$attribute->{associated_methods} && ($attribute->{is} || '') ne 'bare'){
- Carp::cluck(
- 'Attribute (' . $attribute->name . ') of class ' . $metaclass->name
- . ' has no associated methods (did you mean to provide an "is" argument?)');
- }
-
return;
}
use Mouse::Meta::Module;
our @ISA = qw(Mouse::Meta::Module);
+our @CARP_NOT = qw(Mouse); # trust Mouse
+
sub attribute_metaclass;
sub method_metaclass;
$self->{attributes}{$attr->name} = $attr;
$attr->install_accessors();
- if(Mouse::Util::_MOUSE_VERBOSE && !$attr->{associated_methods} && ($attr->{is} || '') ne 'bare'){
- Carp::cluck(qq{Attribute (}.$attr->name.qq{) of class }.$self->name.qq{ has no associated methods (did you mean to provide an "is" argument?)});
+ if(!$attr->{associated_methods} && ($attr->{is} || '') ne 'bare'){
+ Carp::carp(qq{Attribute ($name) of class }.$self->name
+ .qq{ has no associated methods (did you mean to provide an "is" argument?)});
}
return $attr;
}