From: gfx <gfuji@cpan.org>
Date: Thu, 15 Oct 2009 08:13:11 +0000 (+0900)
Subject: Fix an issue in Mouse::Object::new to throw informative messages
X-Git-Tag: 0.40_01~44
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c73a0a96299636e25c1a283ed45b6052ceda35eb;p=gitmo%2FMouse.git

Fix an issue in Mouse::Object::new to throw informative messages
---

diff --git a/lib/Mouse/Object.pm b/lib/Mouse/Object.pm
index 268e845..6e43b02 100644
--- a/lib/Mouse/Object.pm
+++ b/lib/Mouse/Object.pm
@@ -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(@_);