On Sun, Mar 10, 2002 at 10:19:12PM +0100, Rafael Garcia-Suarez wrote: > On 2002.03.10 04:54 Michael G Schwern wrote: > > > > This one is new: lstat() appears to be emitting some extra warnings. > > I wrote the test (in t/lib/warnings/pp_sys). From your attached log : > > # pp_sys.c [pp_lstat] > use warnings 'io'; > lstat STDIN; > open my $fh, $0 or die "# $!"; > lstat $fh; > no warnings 'io'; > lstat STDIN; > lstat $fh; > close $fh; > EXPECTED: > lstat() on filehandle STDIN at - line 3. > lstat() on filehandle $fh at - line 5. > GOT: > lstat() on filehandle STDIN at - line 3. > lstat() on unopened filehandle STDIN at - line 3. > lstat() on filehandle $fh at - line 5. > lib/warnings........................FAILED at test 355 > > This test should not depend on whether STDIN is opened or not. > (This must be a smoke/OS issue, but I'm not sure.)
Likely OS. I've only seen it happen on OSF. > 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. -- Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/ Perl Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One Kids - don't try this at--oh, hell, go ahead, give it a whirl...
