Clean up warnings
[gitmo/Mouse.git] / lib / Mouse / Meta / Attribute.pm
index 315eaa4..a66fb32 100644 (file)
@@ -77,7 +77,9 @@ sub new {
     # (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;
@@ -335,12 +337,6 @@ sub install_accessors{
         $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;
 }