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
keys is not always an lvalue #11452
Comments
From @cpansprout$ perl -le 'read foo, keys %foo, $foo' Why would you want to do that? You wouldn’t, but it would nice if Perl had *some* consistency. I believe that *deleting* some code in op.c would make this work without breaking anything else. (In op_lvalue, the initial if() condition under case OP_KEYS.) Flags: Site configuration information for perl 5.14.0: Configured by sprout at Wed May 11 13:45:58 PDT 2011. Summary of my perl5 (revision 5 version 14 subversion 0) configuration: Locally applied patches: @INC for perl 5.14.0: Environment for perl 5.14.0: |
From @ikegamiOn Sun, Jun 19, 2011 at 10:24 PM, Father Chrysostomos <
Maybe it was there to try to avoid problems when lvalue keys used TARG.
I notice that pos() and vec() don't have this limitation. Go ahead, I'd say. - Eric |
The RT System itself - Status changed from 'new' to 'open' |
From @ikegamiOn Sun, Jun 19, 2011 at 10:24 PM, Father Chrysostomos <
While you're at it, consider pad_free(o->op_targ); I'm thinking that can be replaced with pad_free(o->op_targ); since none of the five ops use TARG when called in lvalue context anymore. |
From @cpansproutOn Sun Jun 19 21:37:15 2011, ikegami@adaelis.com wrote:
Actually, it would allow keys() assignment in list context, causing this (keys %x) = 42; So I need to think about this more.... |
From [Unknown Contact. See original ticket]On Sun Jun 19 21:37:15 2011, ikegami@adaelis.com wrote:
Actually, it would allow keys() assignment in list context, causing this (keys %x) = 42; So I need to think about this more.... |
From @cpansproutOn Sun Jun 19 22:03:13 2011, ikegami@adaelis.com wrote:
But this code path (op_lvalue) is reached not only for true lvalue |
From [Unknown Contact. See original ticket]On Sun Jun 19 22:03:13 2011, ikegami@adaelis.com wrote:
But this code path (op_lvalue) is reached not only for true lvalue |
From @cpansproutOn Sun Jun 19 22:03:13 2011, ikegami@adaelis.com wrote:
What exactly do those two lines do anyway? What is in op_targ that needs |
From [Unknown Contact. See original ticket]On Sun Jun 19 22:03:13 2011, ikegami@adaelis.com wrote:
What exactly do those two lines do anyway? What is in op_targ that needs |
From zefram@fysh.orgThis was fixed by commit e4fc708 -zefram |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#93102 (status was 'resolved')
Searchable as RT93102$
The text was updated successfully, but these errors were encountered: