Lines Matching refs:copy
160 my $copy;
162 $copy = $contents;
163 substr ($copy, 0, 4) = 'iron';
164 test_corrupt ($copy, $sub, "/^File is not a perl storable/",
168 $copy = $contents;
180 substr ($copy, $file_magic + 1, 1) = chr $minor4;
183 $clone = &$sub($copy);
188 test_corrupt ($copy, $sub,
193 $copy = $contents;
195 substr ($copy, $file_magic, 1) = chr 2*$major1;
196 test_corrupt ($copy, $sub,
200 # Continue messing with the previous copy
202 substr ($copy, $file_magic + 1, 1) = chr $minor1;
203 test_corrupt ($copy, $sub,
211 $copy = $contents;
212 substr ($copy, $file_magic + 3, length $header->{byteorder})
215 test_corrupt ($copy, $sub, "/^Byte order is not compatible/",
223 $copy = $contents;
224 substr ($copy, $where++, 1) = chr 0;
225 test_corrupt ($copy, $sub, "/^$name size is not compatible/",
234 $copy = substr ($contents, 0, $where) . chr 255;
236 test_corrupt ($copy, $sub,
241 substr ($copy, $file_magic + 1, 1) = chr $minor1;
243 test_corrupt ($copy, $sub,
247 substr ($copy, $file_magic + 1, 1) = chr $minor4;
251 test_corrupt ($copy, $sub,
258 test_corrupt ($copy, $sub,