5 use constant NOFILE1 => 'this_file_had_better_not_exist';
6 use constant NOFILE2 => NOFILE1 . '2';
7 use constant NOFILE3 => NOFILE1 . '3';
9 # Calls open, while still in the main package. This shouldn't
12 return open(my $fh, '<', $_[0]);
15 # This rename shouldn't be autodying, either.
16 sub leak_test_rename {
17 return rename($_[0], $_[1]);
20 # These are used by core-trampoline-slurp.t
21 sub slurp_leak_unlink {
22 unlink(NOFILE1, NOFILE2, NOFILE3);
29 package autodie_test_module;
31 # This should be calling CORE::open
33 return open(my $fh, '<', $_[0]);
36 # This should be calling CORE::rename
38 return rename($_[0], $_[1]);
41 sub your_dying_rename {
42 use autodie qw(rename);
43 return rename($_[0], $_[1]);