warn(warn_nl, "lstat"); [Perl_my_lstat]
lstat "ab\ncd"
+ Use of -l on filehandle %s [Perl_my_lstat]
+
Can't exec \"%s\": %s [Perl_do_aexec5]
Can't exec \"%s\": %s [Perl_do_exec3]
__END__
# doio.c [Perl_do_open9]
use warnings 'io' ;
-open(F, '|'.($^O eq 'VMS' ? 'mcr ':'')."$^X -e 1|");
+open(F, '|'."$^X -e 1|");
close(F);
no warnings 'io' ;
-open(G, '|'.($^O eq 'VMS' ? 'mcr ':'')."$^X -e 1|");
+open(G, '|'."$^X -e 1|");
close(G);
EXPECT
Can't open bidirectional pipe at - line 3.
no warnings 'uninitialized' ;
print $b ;
EXPECT
-Use of uninitialized value in print at - line 3.
+Use of uninitialized value $a in print at - line 3.
########
# doio.c [Perl_my_stat Perl_my_lstat]
use warnings 'io' ;
Unsuccessful stat on filename containing newline at - line 3.
Unsuccessful stat on filename containing newline at - line 4.
########
+# doio.c [Perl_my_stat]
+use warnings 'io';
+-l STDIN;
+-l $fh;
+open $fh, $0 or die "# $!";
+-l $fh;
+no warnings 'io';
+-l STDIN;
+-l $fh;
+close $fh;
+EXPECT
+Use of -l on filehandle STDIN at - line 3.
+Use of -l on filehandle $fh at - line 6.
+########
# doio.c [Perl_do_aexec5]
+BEGIN {
+ if ($^O eq 'MacOS') {
+ print <<EOM;
+SKIPPED
+# no exec on Mac OS
+EOM
+ exit;
+ }
+}
use warnings 'io' ;
exec "lskdjfalksdjfdjfkls","" ;
no warnings 'io' ;
Can't exec "lskdjfalksdjfdjfkls": .+
########
# doio.c [Perl_do_exec3]
+BEGIN {
+ if ($^O eq 'MacOS') {
+ print <<EOM;
+SKIPPED
+# no exec on Mac OS
+EOM
+ exit;
+ }
+}
use warnings 'io' ;
exec "lskdjfalksdjfdjfkls", "abc" ;
no warnings 'io' ;
Can't exec "lskdjfalksdjfdjfkls(:? abc)?": .+
########
# doio.c [win32_execvp]
+BEGIN {
+ if ($^O eq 'MacOS') {
+ print <<EOM;
+SKIPPED
+# no exec on Mac OS
+EOM
+ exit;
+ }
+}
use warnings 'exec' ;
exec $^X, "-e0" ;
EXPECT
$a = eof STDOUT ;
EXPECT
Filehandle STDOUT opened only for output at - line 3.
+########
+# doio.c [Perl_do_openn]
+use Config;
+BEGIN {
+ if ($Config{useperlio}) {
+ print <<EOM;
+SKIPPED
+# warns only without perlio
+EOM
+ exit;
+ }
+}
+use warnings 'io';
+my $x = "foo";
+open FOO, '>', \$x;
+open BAR, '>&', \*STDOUT; # should not warn
+no warnings 'io';
+open FOO, '>', \$x;
+EXPECT
+Can't open a reference at - line 14.
+########
+# doio.c [Perl_do_openn]
+use Config;
+BEGIN {
+ if (!$Config{useperlio}) {
+ print <<EOM;
+SKIPPED
+# warns only with perlio
+EOM
+ exit;
+ }
+}
+use warnings 'io' ;
+close STDOUT;
+open FH1, "harness"; close FH1;
+no warnings 'io' ;
+open FH2, "harness"; close FH2;
+EXPECT
+Filehandle STDOUT reopened as FH1 only for input at - line 14.
+########
+# doio.c [Perl_do_openn]
+use Config;
+BEGIN {
+ if (!$Config{useperlio}) {
+ print <<EOM;
+SKIPPED
+# warns only with perlio
+EOM
+ exit;
+ }
+}
+use warnings 'io' ;
+close STDIN;
+open my $fh1, ">doiowarn.tmp"; close $fh1;
+no warnings 'io' ;
+open my $fh2, ">doiowarn.tmp"; close $fh2;
+unlink "doiowarn.tmp";
+EXPECT
+Filehandle STDIN reopened as $fh1 only for output at - line 14.