fuck you, Moose::Meta::Role::Attribute. in the ear. with a rusty spork.
Matt S Trout [Sun, 5 May 2013 18:18:39 +0000 (18:18 +0000)]
lib/Moo/HandleMoose.pm

index 7563179..635df60 100644 (file)
@@ -106,7 +106,7 @@ sub inject_real_metaclass_for {
         (
           (grep { $_->has_init_arg }
              $meta->attribute_metaclass->meta->get_all_attributes),
-          grep { $_->has_init_arg ? defined($_->init_arg) : 1 }
+          grep { exists($_->{init_arg}) ? defined($_->init_arg) : 1 }
           map {
             my $meta = Moose::Util::resolve_metatrait_alias('Attribute', $_)
                          ->meta;