class_of in TypeCoercion->new
[gitmo/Moose.git] / 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;
 }