summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorRicardo Signes <rjbs@cpan.org>2013-02-25 11:01:17 -0500
committerRicardo Signes <rjbs@cpan.org>2013-02-26 10:40:57 -0500
commit69815d0833760cfeeb80f4a8c2d1b27b24ec83e3 (patch)
tree3e25c708f48df25d03d33f1aefeed43c0f5a21b7 /gv.c
parenta31421fbd20bffa14a3963180c4166df6ed0e94a (diff)
downloadperl-69815d0833760cfeeb80f4a8c2d1b27b24ec83e3.tar.gz
Revert "Lookup overloaded assignment operators when trying to swap the arguments"
This reverts commit f041cf0f9c6469c41de8b73d5f7b426710c3ff8b. This is reverted in reference to [perl #113834]. Although this commit does fix a real bug, it introduces a new one that is arguably worse. More importantly, it is a regression from 5.16.0. We should produce a test case that solves both bugs, then solve them both, then get that in place. Before 5.18.0 would be nice. After 5.18.0 may have to do.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/gv.c b/gv.c
index b8f0488f69..e8f5402a77 100644
--- a/gv.c
+++ b/gv.c
@@ -2736,16 +2736,9 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
&& (cvp = (AMT_AMAGIC((AMT*)mg->mg_ptr)
? (amtp = (AMT*)mg->mg_ptr)->table
: NULL))
- && ((cv = cvp[off=method+assignshift])
- || (assign && amtp->fallback > AMGfallNEVER && /* fallback to
- * usual method */
- (
-#ifdef DEBUGGING
- fl = 1,
-#endif
- cv = cvp[off=method])))) { /* Method for right
- * argument found */
- lr=1;
+ && (cv = cvp[off=method])) { /* Method for right
+ * argument found */
+ lr=1;
} else if (((cvp && amtp->fallback > AMGfallNEVER)
|| (ocvp && oamtp->fallback > AMGfallNEVER))
&& !(flags & AMGf_unary)) {