10 use Fatal qw(open close :void opendir);
13 eval { open FOO, '<lkjqweriuapofukndajsdlfjnvcvn' };
14 print "not " unless $@ =~ /^Can't open/;
15 print "ok $i\n"; ++$i;
18 for ('$foo', "'$foo'", "*$foo", "\\*$foo") {
19 eval qq{ open $_, '<$0' };
21 print "ok $i\n"; ++$i;
23 print "not " if $@ or scalar(<$foo>) !~ m|^#!./perl|;
24 print "ok $i\n"; ++$i;
27 print "ok $i\n"; ++$i;
30 eval { opendir FOO, 'lkjqweriuapofukndajsdlfjnvcvn' };
31 print "not " unless $@ =~ /^Can't open/;
32 print "ok $i\n"; ++$i;
34 eval { my $a = opendir FOO, 'lkjqweriuapofukndajsdlfjnvcvn' };
35 print "not " if $@ =~ /^Can't open/;
36 print "ok $i\n"; ++$i;