diff options
author | Hugo van der Sanden <hv@crypt.org> | 2001-09-09 19:41:54 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-09-15 12:33:49 +0000 |
commit | 8bfdd7d95bcb290ba639e2c88c5d4370ab8fcfc0 (patch) | |
tree | 73ff47381401919d6d90daccf674fc93918f21a7 /perl.c | |
parent | c366adb4d8e96138e96920f4a327296016a696e0 (diff) | |
download | perl-8bfdd7d95bcb290ba639e2c88c5d4370ab8fcfc0.tar.gz |
Re: [ID 20010815.012] Unfortunate interaction between -0 cmd line arg & (??{CODE}) regex
Message-Id: <200109091741.f89HfsM18534@crypt.compulink.co.uk>
p4raw-id: //depot/perl@12027
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 26 |
1 files changed, 12 insertions, 14 deletions
@@ -212,8 +212,7 @@ perl_construct(pTHXx) #endif } - PL_nrs = newSVpvn("\n", 1); - PL_rs = SvREFCNT_inc(PL_nrs); + PL_rs = newSVpvn("\n", 1); init_stacks(); @@ -540,9 +539,6 @@ perl_destruct(pTHXx) SvREFCNT_dec(PL_rs); /* $/ */ PL_rs = Nullsv; - SvREFCNT_dec(PL_nrs); /* $/ helper */ - PL_nrs = Nullsv; - PL_multiline = 0; /* $* */ Safefree(PL_osname); /* $^O */ PL_osname = Nullch; @@ -1431,10 +1427,12 @@ print \" \\@INC:\\n @INC\\n\";"); PL_e_script = Nullsv; } - /* now that script is parsed, we can modify record separator */ - SvREFCNT_dec(PL_rs); - PL_rs = SvREFCNT_inc(PL_nrs); +/* + Not sure that this is still the right place to do this now that we + no longer use PL_nrs. HVDS 2001/09/09 +*/ sv_setsv(get_sv("/", TRUE), PL_rs); + if (PL_do_undump) my_unexec(); @@ -2151,14 +2149,14 @@ Perl_moreswitches(pTHX_ char *s) I32 flags = 0; numlen = 4; rschar = (U32)grok_oct(s, &numlen, &flags, NULL); - SvREFCNT_dec(PL_nrs); + SvREFCNT_dec(PL_rs); if (rschar & ~((U8)~0)) - PL_nrs = &PL_sv_undef; + PL_rs = &PL_sv_undef; else if (!rschar && numlen >= 2) - PL_nrs = newSVpvn("", 0); + PL_rs = newSVpvn("", 0); else { char ch = rschar; - PL_nrs = newSVpvn(&ch, 1); + PL_rs = newSVpvn(&ch, 1); } return s + numlen; } @@ -2288,11 +2286,11 @@ Perl_moreswitches(pTHX_ char *s) s += numlen; } else { - if (RsPARA(PL_nrs)) { + if (RsPARA(PL_rs)) { PL_ors_sv = newSVpvn("\n\n",2); } else { - PL_ors_sv = newSVsv(PL_nrs); + PL_ors_sv = newSVsv(PL_rs); } } return s; |