summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorBrent Dax <brentdax@cpan.org>2002-07-25 22:41:52 -0700
committerhv <hv@crypt.org>2002-08-05 15:04:54 +0000
commitc963b151157dab5813a32fc6004b63916ad155e8 (patch)
treee88a528a16616c2f136f31b2c37b08e237b08799 /pp_ctl.c
parentd73f34fb2db5664941bbe71b34c335b0ae3b50b3 (diff)
downloadperl-c963b151157dab5813a32fc6004b63916ad155e8.tar.gz
Defined-or patch (cleaned up)
From: "Brent Dax" <brentdax@cpan.org> Message-id: <000001c234a1$d1ca72c0$6501a8c0@deepblue> p4raw-id: //depot/perl@17682
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 971df59a96..336e0026ce 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1378,7 +1378,40 @@ PP(pp_orassign)
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:
+ if (SvGMAGICAL(sv))
+ mg_get(sv);
+ if (SvOK(sv))
+ RETURN;
+ }
+
+ RETURNOP(cLOGOP->op_other);
+}
+
PP(pp_caller)
{
dSP;