summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/cpan/autodie/t/autodie_skippy.pm
blob: 804e52fdca87c9ca5cb3cf47d0e69796d1d62fb6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package autodie_skippy;
use strict;
use warnings;
use autodie;
use parent qw(autodie::skip);

# This should skip upwards to the caller.

sub fail_open {
    open(my $fh, '<', 'this_file_had_better_not_exist');
}

package autodie_unskippy;
use autodie;

# This should not skip upwards.

sub fail_open {
    open(my $fh, '<', 'this_file_had_better_not_exist');
}

1;