1 package MooseX::UndefTolerant::Object;
10 around BUILDARGS => sub {
11 my ($orig, $class, @args) = @_;
13 my $args = $class->$orig(@args);
15 my @delete_keys = grep
18 and exists $args->{$_->init_arg}
19 and not defined $args->{$_->init_arg}
21 my $type_constraint = $_->type_constraint;
22 $type_constraint and not $type_constraint->check(undef)
24 } Moose::Util::find_meta($class)->get_all_attributes();
26 delete @{$args}{@delete_keys} if @delete_keys;