class_of in TypeCoercion->new
Shawn M Moore [Sat, 28 Mar 2009 20:54:33 +0000 (16:54 -0400)]
lib/Moose/Meta/TypeCoercion.pm

index 9e5222f..7f7d10c 100644 (file)
@@ -31,7 +31,7 @@ __PACKAGE__->meta->add_attribute('compiled_type_coercion' => (
 
 sub new { 
     my $class = shift;
-    my $self  = $class->meta->new_object(@_);
+    my $self  = Class::MOP::class_of($class)->new_object(@_);
     $self->compile_type_coercion;
     return $self;
 }