1 package MooseX::StrictConstructor::Meta::Method::Constructor;
9 extends 'Moose::Meta::Method::Constructor';
12 sub _generate_BUILDALL ## no critic RequireArgUnpacking
16 my $source = $self->SUPER::_generate_BUILDALL(@_);
17 $source .= ";\n" if $source;
19 my @attrs = map { $_->name() . ' => 1,' } @{ $self->attributes() };
22 my \%attrs = (@attrs);
24 my \@bad = sort grep { ! \$attrs{\$_} } keys \%params;
27 Carp::confess "Found unknown attribute(s) passed to the constructor: \@bad";