1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Description: fix failure under perl 5.26
Ever since perl’s lvalue subs were introduced, perl itself has been
checking the OPf_MOD flag on the entersub op, not the OPf_REF flag, which
was ignored. I needed an extra flag on entersub to fix a bug (the private
flags are full), so I thought the OPf_REF flag was free game. I do think it
is appropriate for this module to check the same flag for lvalue context
that perl itself has been checking all this time.
Origin: CPAN RT #117618
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=117618
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=117618
Author: Father Chrysostomos <sprout@cpan.org>
Last-Update: 2017-06-19
--- a/Swap.xs
+++ b/Swap.xs
@@ -135,7 +135,7 @@
I32 sref;
SV *sv;
PPCODE:
- sref = (GIMME == G_SCALAR) && (PL_op->op_flags & OPf_REF);
+ sref = (GIMME == G_SCALAR) && (PL_op->op_flags & OPf_MOD);
for (i = 0; i < items; i++) {
if (!SvROK(ST(i))) {
STRLEN z;
|