Skip Menu |

This queue is for tickets about the Data-Swap CPAN distribution.

Report information
The Basics
Id: 117618
Status: open
Priority: 0/
Queue: Data-Swap

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.08
Fixed in: (no value)



Subject: Bleadperl breaks Data::Swap
As per subject. For a patch or followup discussion, please visit https://rt.perl.org/Ticket/Display.html?id=129224 Thanks,
On Thu Sep 08 01:37:29 2016, ANDK wrote: Show quoted text
> As per subject. For a patch or followup discussion, please visit > https://rt.perl.org/Ticket/Display.html?id=129224
Here is the patch. 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.
Subject: open_j5119BGm.txt
diff -Nurp Data-Swap-0.08-C1Igky-orig/Swap.xs Data-Swap-0.08-C1Igky/Swap.xs --- Data-Swap-0.08-C1Igky-orig/Swap.xs 2008-09-12 06:41:59.000000000 -0700 +++ Data-Swap-0.08-C1Igky/Swap.xs 2016-09-07 19:45:22.000000000 -0700 @@ -135,7 +135,7 @@ deref(...) 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;
On 2016-09-08 09:59:01, SPROUT wrote: Show quoted text
> On Thu Sep 08 01:37:29 2016, ANDK wrote:
> > As per subject. For a patch or followup discussion, please visit > > https://rt.perl.org/Ticket/Display.html?id=129224
> > Here is the patch. 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.
perl 5.26.0 RC1 is out. The proposed patch still works.
On 2017-05-13 08:09:48, SREZIC wrote: Show quoted text
> On 2016-09-08 09:59:01, SPROUT wrote:
> > On Thu Sep 08 01:37:29 2016, ANDK wrote:
> > > As per subject. For a patch or followup discussion, please visit > > > https://rt.perl.org/Ticket/Display.html?id=129224
> > > > Here is the patch. 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.
> > perl 5.26.0 RC1 is out. The proposed patch still works.
perl 5.28.0 RC1 is out. The patch still works.
On 2018-05-24 01:57:14, SREZIC wrote: Show quoted text
> On 2017-05-13 08:09:48, SREZIC wrote:
> > On 2016-09-08 09:59:01, SPROUT wrote:
> > > On Thu Sep 08 01:37:29 2016, ANDK wrote:
> > > > As per subject. For a patch or followup discussion, please visit > > > > https://rt.perl.org/Ticket/Display.html?id=129224
> > > > > > Here is the patch. 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.
> > > > perl 5.26.0 RC1 is out. The proposed patch still works.
> > perl 5.28.0 RC1 is out. The patch still works.
The patch also works with perl 5.29.x (tried 5.29.3).