newFORM($2, $3, $4);
$$ = (OP*)NULL;
#endif
- if (CvOUTSIDE(fmtcv) && !CvUNIQUE(CvOUTSIDE(fmtcv))) {
+ if (CvOUTSIDE(fmtcv) && !CvEVAL(CvOUTSIDE(fmtcv))) {
SvREFCNT_inc_simple_void(fmtcv);
pad_add_anon(fmtcv, OP_NULL);
}
}
| PACKAGE WORD WORD '{' remember
{
- int save_3_latefree = $3->op_latefree;
- $3->op_latefree = 1;
package($3);
- $3->op_latefree = save_3_latefree;
if ($2) {
- int save_2_latefree = $2->op_latefree;
- $2->op_latefree = 1;
package_version($2);
- $2->op_latefree = save_2_latefree;
}
}
stmtseq '}'
/* a block is a loop that happens once */
$$ = newWHILEOP(0, 1, (LOOP*)(OP*)NULL,
(OP*)NULL, block_end($5, $7), (OP*)NULL, 0);
- op_free($3);
- if ($2)
- op_free($2);
TOKEN_GETMAD($4,$$,'{');
TOKEN_GETMAD($8,$$,'}');
if (PL_parser->copline > (line_t)IVAL($4))
TOKEN_GETMAD($2,$$,'(');
TOKEN_GETMAD($4,$$,')');
}
- | PMFUNC '(' listexpr ')' /* m//, s///, tr/// */
- { $$ = pmruntime($1, $3, 1);
- TOKEN_GETMAD($2,$$,'(');
- TOKEN_GETMAD($4,$$,')');
+ | PMFUNC /* m//, s///, qr//, tr/// */
+ {
+ if ( $1->op_type != OP_TRANS
+ && $1->op_type != OP_TRANSR
+ && (((PMOP*)$1)->op_pmflags & PMf_HAS_CV))
+ {
+ $<ival>$ = start_subparse(FALSE, CVf_ANON);
+ SAVEFREESV(PL_compcv);
+ } else
+ $<ival>$ = 0;
+ }
+ '(' listexpr ')'
+ { $$ = pmruntime($1, $4, 1, $<ival>2);
+ TOKEN_GETMAD($3,$$,'(');
+ TOKEN_GETMAD($5,$$,')');
}
| WORD
| listop