1#!/usr/bin/perl
2
3package foo;
4use warnings;
5use strict;
6use Test::More tests => 2;
7use autodie;
8
9
10use_system();
11ok("system() works with a lexical 'no autodie' block (github issue #69");
12break_system();
13
14sub break_system {
15    no autodie;
16    open(my $fh, "<", 'NONEXISTENT');
17    ok("survived failing open");
18}
19
20sub use_system {
21    system($^X, '-e' , 1);
22}
231;
24