package MooseX::StrictConstructor::Trait::Method::Constructor;
+# applied as class_metaroles => { constructor => [ __PACKAGE__ ] }, for older Moose
+
use Moose::Role;
use namespace::autoclean;
use B ();
-use Carp ();
around '_generate_BUILDALL' => sub {
my $orig = shift;
my \@bad = sort grep { ! \$attrs{\$_} } keys \%{ \$params };
if (\@bad) {
- Carp::confess "Found unknown attribute(s) passed to the constructor: \@bad";
+ Moose->throw_error("Found unknown attribute(s) passed to the constructor: \@bad");
}
EOF