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
my $foo->{foo} = $foo; syntax valid only in perl > 5.10.0 ( unintentional change? ) #10234
Comments
From @apocalypseCreated by @apocalypseWhile helping David Golden iron out bugs in the CPANTesters 2.0 code I <+p5changes> Commit #a62b51b8(/Shinya Hayakawa): Re: my $x->{foo} The bug is not that this "feature" should be removed. The bug is that Note: <xdg> perl/t/op/my.t has this line: ++my $x->{foo}; Note2: You can do "ack 'my\s+\$\w+->\{' yourcode/" to find this syntax... [cpan@ubuntu-server64 ~]$ cat testsyntax.pl my $string = "foo"; print Dumper( $cache ); This is perl, v5.10.0 built for x86_64-linux-gnu-thread-multi Copyright 1987-2007, Larry Wall Perl may be copied only under the terms of either the Artistic License Complete documentation for Perl, including FAQ lists, should be found on [cpan@ubuntu-server64 ~]$ perls/perl-5.8.9-default/bin/perl testsyntax.pl This is perl, v5.8.9 built for x86_64-linux Copyright 1987-2008, Larry Wall Perl may be copied only under the terms of either the Artistic License Complete documentation for Perl, including FAQ lists, should be found on [cpan@ubuntu-server64 ~]$ cat testsyntax2.pl my $string = "foo"; print Dumper( $cache ); Perl Info
|
From @ikegamiOn Mon, Mar 15, 2010 at 3:11 AM, perl@0ne.us <perlbug-followup@perl.org>wrote:
The syntax was valid before.
The difference is that my $foo wasn't treated as an lvalue before 5.10.
Autovivification is documented in perlref. It is also mentioned in perldata.
Syntax wasn't changed. I don't see any mention of the bug fix, but not all bug fixes are listed. |
The RT System itself - Status changed from 'new' to 'open' |
From @ikegamiOn Mon, Mar 15, 2010 at 3:11 AM, perl@0ne.us <perlbug-followup@perl.org>wrote:
my $foo->{foo} = $foo; syntax valid only in perl > 5.10.0 ( unintentional
The fix was intentional: http://perl5.git.perl.org/perl.git/commitdiff/a62b51b8b5ba4453033358d44b4729c019d6ae42 |
From @demerphqOn 16 March 2010 18:39, Eric Brine <ikegami@adaelis.com> wrote:
Except that the syntax in the commit message and here is subtly but (my $x)->{foo} is not really the same thing as my $x->{foo} is it? Yves -- |
From @janduboisOn Tue, 16 Mar 2010, demerphq wrote:
What else could it be? my() works on names, not expressions. Not that I like this particular example; I would always write it as: my $x = { foo => "bar" }; Cheers, |
From @ikegamiOn Tue, Mar 16, 2010 at 2:20 PM, demerphq <demerphq@gmail.com> wrote:
Yes. (Deparse is buggy, so using Concise)
|
From @davidnicolOn Tue, Mar 16, 2010 at 1:36 PM, Jan Dubois <jand@activestate.com> wrote:
what a relief. I was worried that the my somehow reached into the local $x->{foo} = q/bar/; would. -- |
@iabyn - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#73570 (status was 'rejected')
Searchable as RT73570$
The text was updated successfully, but these errors were encountered: