This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
If perl's minimal required version number is >= 5.6.0,
[perl5.git] / pp_hot.c
index 27e863d..05b9b16 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1122,6 +1122,9 @@ PP(pp_aassign)
            PL_egid = PerlProc_getegid();
        }
        PL_tainting |= (PL_uid && (PL_euid != PL_uid || PL_egid != PL_gid));
+
+       if (PL_delaymagic & DM_ARRAY && SvMAGICAL((SV*)ary))
+           mg_set((SV*)ary);
     }
     PL_delaymagic = 0;
 
@@ -1152,14 +1155,6 @@ PP(pp_aassign)
            *relem++ = (lelem <= lastlelem) ? *lelem++ : &PL_sv_undef;
     }
 
-    /* This is done at the bottom and in this order because
-       mro_isa_changed_in() can throw exceptions */
-    if(PL_delayedisa) {
-        HV* stash = PL_delayedisa;
-        PL_delayedisa = NULL;
-        mro_isa_changed_in(stash);
-    }
-
     RETURN;
 }
 
@@ -1266,9 +1261,12 @@ PP(pp_match)
            }
        }
     }
-    /* remove comment to get faster /g but possibly unsafe $1 vars after a
-       match. Test for the unsafe vars will fail as well*/
-    if (( /* !global &&  */ rx->nparens) 
+    /* XXX: comment out !global get safe $1 vars after a
+       match, BUT be aware that this leads to dramatic slowdowns on
+       /g matches against large strings.  So far a solution to this problem
+       appears to be quite tricky.
+       Test for the unsafe vars are TODO for now. */
+    if ((  !global &&  rx->nparens) 
            || SvTEMP(TARG) || PL_sawampersand ||
            (rx->extflags & (RXf_EVAL_SEEN|RXf_PMf_KEEPCOPY)))
        r_flags |= REXEC_COPY_STR;