Refactor the constructor of Attribute
[gitmo/Mouse.git] / lib / Mouse / Meta / Class.pm
index c1e614a..1093e02 100644 (file)
@@ -192,6 +192,10 @@ sub new_object {
         $trigger->($instance, $value);
     }
 
+    if($self->is_anon_class){
+        $instance->{__METACLASS__} = $self;
+    }
+
     return $instance;
 }