X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FStrictConstructor%2FTrait%2FMethod%2FConstructor.pm;fp=lib%2FMooseX%2FStrictConstructor%2FTrait%2FMethod%2FConstructor.pm;h=0ceec121a4402da7c22c70b606785d503da6a9ba;hb=714128ef886ae4a37d5aefe6910a7581150ec149;hp=3c228b0c11698ecac07a48a1faf7b734417a0987;hpb=58d11620a943aacb701bd227e9b38e66349156e8;p=gitmo%2FMooseX-StrictConstructor.git diff --git a/lib/MooseX/StrictConstructor/Trait/Method/Constructor.pm b/lib/MooseX/StrictConstructor/Trait/Method/Constructor.pm index 3c228b0..0ceec12 100644 --- a/lib/MooseX/StrictConstructor/Trait/Method/Constructor.pm +++ b/lib/MooseX/StrictConstructor/Trait/Method/Constructor.pm @@ -5,7 +5,6 @@ use Moose::Role; use namespace::autoclean; use B (); -use Carp (); around '_generate_BUILDALL' => sub { my $orig = shift; @@ -27,7 +26,7 @@ my \%attrs = (@attrs); 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