diff options
author | Vincent Pit <perl@profvince.com> | 2010-08-31 13:10:26 +0200 |
---|---|---|
committer | Vincent Pit <perl@profvince.com> | 2010-08-31 13:10:29 +0200 |
commit | 9b9e0be404d6f68cd08f64332ec2cf911d35f432 (patch) | |
tree | 826772e83c93eebeecf9d4b0aa9ac4b6913e48a8 | |
parent | bd7e438e4a65308908af2cfdf35e11de3026c9ef (diff) | |
download | perl-9b9e0be404d6f68cd08f64332ec2cf911d35f432.tar.gz |
Add two missing break in Perl_magic_set's big switch
This fixes $^A being reset when $1..$2 are localized before any regexp match
happened.
-rw-r--r-- | mg.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2369,7 +2369,6 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) setparen: if (PL_curpm && (rx = PM_GETRE(PL_curpm))) { CALLREG_NUMBUF_STORE((REGEXP * const)rx,paren,sv); - break; } else { /* Croak with a READONLY error when a numbered match var is * set without a previous pattern match. Unless it's C<local $1> @@ -2378,6 +2377,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) Perl_croak_no_modify(aTHX); } } + break; case '\001': /* ^A */ sv_setsv(PL_bodytarget, sv); break; @@ -2476,6 +2476,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) } else if (strEQ(remaining, "OSTMATCH")) { /* $^POSTMATCH */ goto do_postmatch; } + break; case '\024': /* ^T */ #ifdef BIG_TIME PL_basetime = (Time_t)(SvNOK(sv) ? SvNVX(sv) : sv_2nv(sv)); |