+ watch { undef %h } { }, 'tied hash undef';
+}
+
+SKIP: {
+ skip 'copy magic not called for cloned prototypes before perl 5.17.0' => 3
+ unless VMG_COMPAT_CODE_COPY_CLONE;
+ my $w = wizard copy => sub {
+ is ref($_[0]), 'CODE', 'first arg in copy on clone is a code ref';
+ is $_[2], undef, 'third arg in copy on clone is undef';
+ is ref($_[3]), 'CODE', 'fourth arg in copy on clone is a code ref';
+ };
+ eval <<'TEST_COPY';
+ package X;
+ sub MODIFY_CODE_ATTRIBUTES {
+ my ($pkg, $sub) = @_;
+ &Variable::Magic::cast($sub, $w);
+ return;
+ }
+ my $i;
+ my $f = sub : Hello { $i };
+TEST_COPY