Include both attribute name and init_arg in constructor errors (RT#79596)
[gitmo/Moo.git] / lib / Method / Generate / Constructor.pm
index bc44372..50a5659 100644 (file)
@@ -150,7 +150,7 @@ sub _assign_new {
     my $source = "\$args->{$arg_key}";
     my $attr_spec = $spec->{$_};
     $self->_cap_call($ag->generate_populate_set(
-      '$new', $_, $attr_spec, $source, $test
+      '$new', $_, $attr_spec, $source, $test, $test{$_},
     ));
   } sort keys %test;
 }