Moose error compat
[gitmo/Mouse.git] / lib / Mouse / Meta / Attribute.pm
index 370db8a..225ea59 100644 (file)
@@ -267,10 +267,10 @@ sub validate_args {
         if ref($args->{default})
         && ref($args->{default}) ne 'CODE';
 
-    confess "You cannot auto-dereference without specifying a type constraint on attribute $name"
+    confess "You cannot auto-dereference without specifying a type constraint on attribute ($name)"
         if $args->{auto_deref} && !exists($args->{isa});
 
-    confess "You cannot auto-dereference anything other than a ArrayRef or HashRef on attribute $name"
+    confess "You cannot auto-dereference anything other than a ArrayRef or HashRef on attribute ($name)"
         if $args->{auto_deref}
         && $args->{isa} ne 'ArrayRef'
         && $args->{isa} ne 'HashRef';