From: M. J. T. Guy Date: Wed, 9 Jun 1999 18:27:51 +0000 (+0100) Subject: fix for C<$/ = 42> setting paragraph mode (applied with small X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=af7d13df55983dddc63f9a0d17150fe82dfa08fb;p=p5sagit%2Fp5-mst-13.2.git fix for C<$/ = 42> setting paragraph mode (applied with small tweak) Message-Id: Subject: Re: [ID 19990608.002] Possible bug with binmode and on Perl 5.005_03 Win32 p4raw-id: //depot/perl@3610 --- diff --git a/perl.h b/perl.h index b09660a..9def948 100644 --- a/perl.h +++ b/perl.h @@ -2379,8 +2379,8 @@ enum { /* pass one of these to get_vtbl */ /* Various states of an input record separator SV (rs, nrs) */ #define RsSNARF(sv) (! SvOK(sv)) -#define RsSIMPLE(sv) (SvOK(sv) && SvCUR(sv)) -#define RsPARA(sv) (SvOK(sv) && ! SvCUR(sv)) +#define RsSIMPLE(sv) (SvOK(sv) && (! SvPOK(sv) || SvCUR(sv))) +#define RsPARA(sv) (SvPOK(sv) && ! SvCUR(sv)) #define RsRECORD(sv) (SvROK(sv) && (SvIV(SvRV(sv)) > 0)) /* Enable variables which are pointers to functions */ diff --git a/t/base/rs.t b/t/base/rs.t index 52a9572..07cc8fd 100755 --- a/t/base/rs.t +++ b/t/base/rs.t @@ -24,7 +24,7 @@ $bar = ; if ($bar eq "12\n") {print "ok 2\n";} else {print "not ok 2\n";} # Try a non line terminator -$/ = "3"; +$/ = 3; $bar = ; if ($bar eq "123") {print "ok 3\n";} else {print "not ok 3\n";}