From: Shawn M Moore Date: Sat, 28 Mar 2009 21:06:11 +0000 (-0400) Subject: class_of for BUILDARGS X-Git-Tag: 0.73_01~36^2~14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=46047bea497098b2548dc30e1413257d5cc4b7e0;p=gitmo%2FMoose.git class_of for BUILDARGS --- diff --git a/lib/Moose/Object.pm b/lib/Moose/Object.pm index cd35358..829c90d 100644 --- a/lib/Moose/Object.pm +++ b/lib/Moose/Object.pm @@ -23,7 +23,7 @@ sub BUILDARGS { my $class = shift; if ( scalar @_ == 1 ) { unless ( defined $_[0] && ref $_[0] eq 'HASH' ) { - $class->meta->throw_error( + Class::MOP::class_of($class)->throw_error( "Single parameters to new() must be a HASH ref", data => $_[0] ); }