Commit | Line | Data |
---|---|---|
45595850 | 1 | package SQL::Translator::Role::BuildArgs; |
46ad748f | 2 | use Moo::Role; |
3 | ||
4 | around BUILDARGS => sub { | |
5 | my $orig = shift; | |
6 | my $self = shift; | |
7 | my $args = $self->$orig(@_); | |
8 | ||
9 | foreach my $arg (keys %{$args}) { | |
10 | delete $args->{$arg} unless defined($args->{$arg}); | |
11 | } | |
12 | return $args; | |
13 | }; | |
14 | ||
15 | 1; |