X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FStrictConstructor%2FRole%2FObject.pm;h=4b5a7651323b64699c5c81bb159ce75c1ed5fa42;hb=675cf837a12a363a03931fdab707070d06d913b1;hp=4eef0d477d8f49d4bf6663a8313ba454f96a4abd;hpb=58d11620a943aacb701bd227e9b38e66349156e8;p=gitmo%2FMooseX-StrictConstructor.git diff --git a/lib/MooseX/StrictConstructor/Role/Object.pm b/lib/MooseX/StrictConstructor/Role/Object.pm index 4eef0d4..4b5a765 100644 --- a/lib/MooseX/StrictConstructor/Role/Object.pm +++ b/lib/MooseX/StrictConstructor/Role/Object.pm @@ -18,8 +18,8 @@ after 'BUILDALL' => sub { my @bad = sort grep { !$attrs{$_} } keys %{$params}; if (@bad) { - confess - "Found unknown attribute(s) init_arg passed to the constructor: @bad"; + Moose->throw_error( + "Found unknown attribute(s) init_arg passed to the constructor: @bad"); } return;