Document error_class attribute.
[gitmo/Moose.git] / lib / Moose / Object.pm
index 242425f..cdab64e 100644 (file)
@@ -7,8 +7,6 @@ use warnings;
 use if ( not our $__mx_is_compiled ), 'Moose::Meta::Class';
 use if ( not our $__mx_is_compiled ), metaclass => 'Moose::Meta::Class';
 
-use Carp 'confess';
-
 our $VERSION   = '0.57';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
@@ -26,7 +24,7 @@ sub BUILDARGS {
     if (scalar @_ == 1) {
         if (defined $_[0]) {
             (ref($_[0]) eq 'HASH')
-                || $class->throw_error("Single parameters to new() must be a HASH ref", data => $_[0]);
+                || $class->meta->throw_error("Single parameters to new() must be a HASH ref", data => $_[0]);
             return {%{$_[0]}};
         } 
         else {