Front page | perl.perl5.porters |
Postings from November 2003
Re: bug or a feature?
Thread Previous
|
Thread Next
From:
Nicholas Clark
Date:
November 21, 2003 14:53
Subject:
Re: bug or a feature?
Message ID:
20031121225310.GG11153@plum.flirble.org
On Fri, Nov 21, 2003 at 09:16:26PM +0000, Nick Ing-Simmons wrote:
> Torsten Foertsch <torsten.foertsch@gmx.net> writes:
> >
> >
> >In both cases sv_gets() at line 1576 returns false (EOF). But with $/="\n" it
> >enters the if-block at line 1579 goes through lines 1596 and 1597 and returns
> >in line 1603. With $/=undef the if-block at line 1579 is not entered.
> >
> >BTW, what does RsSNARF (or simply snarf) mean? I have looked it up at
> >http://dict.leo.org with no result.
>
> I am not sure what "snarf" means, but RsSNARF means: $/ is undef, read
> entire file as one "line".
>
> I think there is a "feature" that the "whole file" means each-file
> in the case of *ARGV aka <>.
Yes, that's a feature. But what we seem to agree is a bug is the change
from this behaviour:
$ perl5.00405 -we 'undef $/;open F, "/" and defined(scalar <F>) and print "ok\n"; print "$!\n"'
Is a directory
to that behaviour:
$ perl5.00503 -we 'undef $/;open F, "/" and defined(scalar <F>) and print "ok\n"; print "$!\n"'
ok
Is a directory
which Andreas has identified as caused by this patch:
http://public.activestate.com/cgi-bin/perlbrowse?patch=2910
which I vaguely remember reading about at the time.
And if we agree that this change is a regression, then someone needs to
write a test case, and someone (else) a fix.
Nicholas Clark
Thread Previous
|
Thread Next