RETSETNO;
}
-PP(pp_andassign)
-{
- dSP;
- if (!SvTRUE(TOPs))
- RETURN;
- else
- RETURNOP(cLOGOP->op_other);
-}
-
-PP(pp_orassign)
-{
- dSP;
- if (SvTRUE(TOPs))
- RETURN;
- else
- RETURNOP(cLOGOP->op_other);
-}
-
-PP(pp_dorassign)
-{
- dSP;
- register SV* sv;
-
- sv = TOPs;
- if (!sv || !SvANY(sv)) {
- RETURNOP(cLOGOP->op_other);
- }
-
- switch (SvTYPE(sv)) {
- case SVt_PVAV:
- if (AvMAX(sv) >= 0 || SvGMAGICAL(sv) || (SvRMAGICAL(sv) && mg_find(sv, PERL_MAGIC_tied)))
- RETURN;
- break;
- case SVt_PVHV:
- if (HvARRAY(sv) || SvGMAGICAL(sv) || (SvRMAGICAL(sv) && mg_find(sv, PERL_MAGIC_tied)))
- RETURN;
- break;
- case SVt_PVCV:
- if (CvROOT(sv) || CvXSUB(sv))
- RETURN;
- break;
- default:
- SvGETMAGIC(sv);
- if (SvOK(sv))
- RETURN;
- }
-
- RETURNOP(cLOGOP->op_other);
-}
-
PP(pp_caller)
{
dSP;
* sort block, which is a CXt_NULL
* not a CXt_SUB */
dounwind(0);
+ PL_stack_base[1] = *PL_stack_sp;
+ PL_stack_sp = PL_stack_base + 1;
return 0;
}
else
if (cxix < cxstack_ix)
dounwind(cxix);
- if (CxMULTICALL(&cxstack[cxix]))
+ if (CxMULTICALL(&cxstack[cxix])) {
+ gimme = cxstack[cxix].blk_gimme;
+ if (gimme == G_VOID)
+ PL_stack_sp = PL_stack_base;
+ else if (gimme == G_SCALAR) {
+ PL_stack_base[1] = *PL_stack_sp;
+ PL_stack_sp = PL_stack_base + 1;
+ }
return 0;
+ }
POPBLOCK(cx,newpm);
switch (CxTYPE(cx)) {
/* startop op_free() this to undo. */
/* code Short string id of the caller. */
{
+ /* FIXME - how much of this code is common with pp_entereval? */
dVAR; dSP; /* Make POPBLOCK work. */
PERL_CONTEXT *cx;
SV **newsp;
char *safestr;
int runtime;
CV* runcv = Nullcv; /* initialise to avoid compiler warnings */
+ STRLEN len;
ENTER;
lex_start(sv);
(i.e. before run-time proper). To work around the coredump that
ensues, we always turn GvMULTI_on for any globals that were
introduced within evals. See force_ident(). GSAR 96-10-12 */
- safestr = savepv(tmpbuf);
- SAVEDELETE(PL_defstash, safestr, strlen(safestr));
+ len = strlen(tmpbuf);
+ safestr = savepvn(tmpbuf, len);
+ SAVEDELETE(PL_defstash, safestr, len);
SAVEHINTS();
#ifdef OP_IN_REGISTER
PL_opsave = op;
SETERRNO(0, SS_NORMAL);
/* Assume success here to prevent recursive requirement. */
- len = strlen(name);
+ /* name is never assigned to again, so len is still strlen(name) */
/* Check whether a hook in @INC has already filled %INC */
if (!hook_sv) {
(void)hv_store(GvHVn(PL_incgv), name, len, newSVpv(CopFILE(&PL_compiling),0),0);
CV* runcv;
U32 seq;
- if (!SvPV_const(sv,len))
+ if (!SvPV_nolen_const(sv))
RETPUSHUNDEF;
TAINT_PROPER("eval");
(i.e. before run-time proper). To work around the coredump that
ensues, we always turn GvMULTI_on for any globals that were
introduced within evals. See force_ident(). GSAR 96-10-12 */
- safestr = savepv(tmpbuf);
- SAVEDELETE(PL_defstash, safestr, strlen(safestr));
+ len = strlen(tmpbuf);
+ safestr = savepvn(tmpbuf, len);
+ SAVEDELETE(PL_defstash, safestr, len);
SAVEHINTS();
PL_hints = PL_op->op_targ;
SAVESPTR(PL_compiling.cop_warnings);