On 2002.03.10 22:47 Michael G Schwern wrote:
> On Sun, Mar 10, 2002 at 10:19:12PM +0100, Rafael Garcia-Suarez wrote:
> > Have you comments on the test?
> > I see 2 solutions :
> > 1. replace lstat STDIN by a bare lstat FH (previously open to some known file)
> > 2. insert a "no warnings qw(unopened closed)" after the "use warnings 'io'".
> 
> I think #1 is the best thing to do.

Here's the patch :

--- t/lib/warnings/pp_sys.orig  Tue Mar  5 15:47:37 2002
+++ t/lib/warnings/pp_sys       Mon Mar 11 14:32:34 2002
@@ -403,16 +403,18 @@
 ########
 # pp_sys.c [pp_lstat]
 use warnings 'io';
-lstat STDIN;
+open FH, "harness" or die "# $!";
+lstat FH;
 open my $fh, $0 or die "# $!";
 lstat $fh;
 no warnings 'io';
-lstat STDIN;
+lstat FH;
 lstat $fh;
+close FH;
 close $fh;
 EXPECT
-lstat() on filehandle STDIN at - line 3.
-lstat() on filehandle $fh at - line 5.
+lstat() on filehandle FH at - line 4.
+lstat() on filehandle $fh at - line 6.
 ########
 # pp_sys.c [pp_getc]
 use warnings qw(unopened closed) ;

Reply via email to