Fix an issue in Mouse::Object::new to throw informative messages
[gitmo/Mouse.git] / lib / Mouse / Object.pm
index 268e845..6e43b02 100644 (file)
@@ -4,7 +4,7 @@ use Mouse::Util qw(does dump); # enables strict and warnings
 sub new {
     my $class = shift;
 
-    $class->throw_error('Cannot call new() on an instance') if ref $class;
+    $class->meta->throw_error('Cannot call new() on an instance') if ref $class;
 
     my $args = $class->BUILDARGS(@_);