summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 4100ae2449..827395f87c 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1286,8 +1286,10 @@ PP(pp_match)
- /* empty pattern special-cased to use last successful pattern if possible */
- if (!RX_PRELEN(rx) && PL_curpm) {
+ /* empty pattern special-cased to use last successful pattern if
+ possible, except for qr// */
+ if (!((struct regexp *)SvANY(rx))->mother_re && !RX_PRELEN(rx)
+ && PL_curpm) {
pm = PL_curpm;
rx = PM_GETRE(pm);
}