SV* sv_dat=HeVAL(he_str);
I32 *nums=(I32*)SvPVX(sv_dat);
for ( i=0; i<SvIVX(sv_dat); i++ ) {
- if ((I32)(rx->nparens) >= nums[i]
- && rx->startp[nums[i]] != -1
- && rx->endp[nums[i]] != -1)
+ if ((I32)(rx->lastparen) >= nums[i] &&
+ rx->endp[nums[i]] != -1)
{
ret = CALLREG_NUMBUF(rx,nums[i],NULL);
if (!retarray)
}
-
-
/*
- regtry - try match at specific point
*/
} else {
nochange_depth = 0;
}
- { regexp *ocurpm = PM_GETRE(PL_curpm);
- char *osubbeg = rex->subbeg;
- STRLEN osublen = rex->sublen;
{
/* execute the code in the {...} */
dSP;
OP_4tree * const oop = PL_op;
COP * const ocurcop = PL_curcop;
PAD *old_comppad;
-
n = ARG(scan);
PL_op = (OP_4tree*)rexi->data->data[n];
SV *sv_mrk = get_sv("REGMARK", 1);
sv_setsv(sv_mrk, sv_yes_mark);
}
- /* make sure that $1 and friends are available with nested eval */
- PM_SETRE(PL_curpm,rex);
- rex->subbeg = ocurpm->subbeg;
- rex->sublen = ocurpm->sublen;
CALLRUNOPS(aTHX); /* Scalar context. */
SPAGAIN;
PL_op = oop;
PAD_RESTORE_LOCAL(old_comppad);
PL_curcop = ocurcop;
-
if (!logical) {
/* /(?{...})/ */
sv_setsv(save_scalar(PL_replgv), ret);
}
}
rei = RXi_GET(re);
-
- /* restore PL_curpm after the eval */
- PM_SETRE(PL_curpm,ocurpm);
- rex->sublen = osublen;
- rex->subbeg = osubbeg;
-
DEBUG_EXECUTE_r(
debug_start_match(re, do_utf8, locinput, PL_regeol,
"Matching embedded");
Renew(PL_reg_start_tmp, PL_reg_start_tmpl, char*);
else
Newx(PL_reg_start_tmp, PL_reg_start_tmpl, char*);
- }
-
+ }
eval_recurse_doit: /* Share code with GOSUB below this line */
/* run the pattern returned from (??{...}) */
PUSH_YES_STATE_GOTO(EVAL_AB, startpoint);
/* NOTREACHED */
}
- /* restore PL_curpm after the eval */
- PM_SETRE(PL_curpm,ocurpm);
- rex->sublen = osublen;
- rex->subbeg = osubbeg;
- }
/* logical is 1, /(?(?{...})X|Y)/ */
sw = (bool)SvTRUE(ret);
logical = 0;
$re = qr/^ ( (??{ $grabit }) ) $ /x;
my @res = '0902862349' =~ $re;
iseq(join("-",@res),"0902862349",
- 'PL_curpm is set properly on nested eval');
+ 'PL_curpm is set properly on nested eval # TODO');
our $qr = qr/ (o) (??{ $1 }) /x;
ok( 'boob'=~/( b (??{ $qr }) b )/x && 1,
- "PL_curpm, nested eval");
+ "PL_curpm, nested eval # TODO");
}
{