New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4-arg substr does not provide proper lvalue context #12491
Comments
From @cpansprout$ ./perl -Ilib -le 'substr I would expect 234 from both one-liners. I suspect +sub:lvalue { substr lvalue_sub() }->()=3 has similar problems. Flags: Site configuration information for perl 5.17.5: Configured by sprout at Sat Sep 22 18:51:23 PDT 2012. Summary of my perl5 (revision 5 version 17 subversion 5) configuration: Locally applied patches: @INC for perl 5.17.5: Environment for perl 5.17.5: |
From @LeontOn Sun, Oct 14, 2012 at 10:17 PM, Father Chrysostomos
«perl -le 'my $foo; sub _ : lvalue{$foo} substr _, 0, 0, "234"; print Leon |
The RT System itself - Status changed from 'new' to 'open' |
From @b2gillsOn Sun, Oct 14, 2012 at 3:17 PM, Father Chrysostomos
While you are correct that there is a bug here, your test doesn't expose it. That is because you are referencing two different @_ arrays; $ perl -Ilib -le 'sub _:lvalue{$#_} _ = "234"; print $#_' This one is affected by the bug. $ perl -Ilib -le 'sub _:lvalue{$#a} substr _, 0, 0, "234"; print $#a' |
From Eirik-Berg.Hanssen@allverden.noOn Sun, Oct 14, 2012 at 10:17 PM, Father Chrysostomos <
I wouldn't, since eirik@bluebird[22:49:59] But the problem with substr persists also with better examples: eirik@bluebird[22:50:23] Eirik |
From zefram@fysh.orgFixed in commit 19a8de4. -zefram |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#115258 (status was 'resolved')
Searchable as RT115258$
The text was updated successfully, but these errors were encountered: