$post_process .= "\$checks[$index]->($instance_slot)\n";
$post_process .= " or $attr_var->_throw_type_constraint_error($instance_slot, $constraint_var);\n";
}
- if($is_weak_ref){
- $post_process = "Scalar::Util::weaken($instance_slot) "
- . "if ref $instance_slot;\n";
- }
# build cde for an attribute
if (defined $init_arg) {
$code .= "}\n" if defined $init_arg;
+ if($is_weak_ref){
+ $code .= "Scalar::Util::weaken($instance_slot) "
+ . "if ref $instance_slot;\n";
+ }
+
push @res, $code;
}
=head1 VERSION
-This document describes Mouse version 0.82
+This document describes Mouse version 0.95
=head1 SEE ALSO