1 package MooseX::UndefTolerant::Class;
3 # applied to metaclass, for Moose >= 1.9900
10 # TODO: this code should be in the attribute trait, in the inlined version of
11 # initialize_instance_slot, but this does not yet exist!
13 around _inline_init_attr_from_constructor => sub {
16 my ($attr, $idx) = @_;
18 my @source = $self->$orig(@_);
20 my $init_arg = $attr->init_arg;
23 "if ( exists \$params->{$init_arg} && defined \$params->{$init_arg} ) {",
26 "delete \$params->{$init_arg};",