Lines Matching refs:copy
67 my $copy = &$cloner($hash);
70 my @out_keys = sort keys %$copy;
77 # $copy = $hash; # used in initial debug of the tests
79 ok ++$test, Internals::SvREADONLY(%$copy), "cloned hash restricted?";
81 ok ++$test, Internals::SvREADONLY($copy->{question}),
82 "key 'question' not locked in copy?";
84 ok ++$test, !Internals::SvREADONLY($copy->{answer}),
85 "key 'answer' not locked in copy?";
87 eval { $copy->{extra} = 15 } ;
94 eval { $copy->{nono} = 7 } ;
97 ok ++$test, exists $copy->{undef},
100 ok ++$test, !defined $copy->{undef},
118 my $copy = &$cloner(\%hash2);
122 eval { $copy->{$k} = undef } ;