develooper Front page | perl.perl6.compiler | Postings from November 2011

[perl #102876] [BUG] package A { our %h; %h{'A'} = 2 } Method 'at_key' not found - package A { our %h = ('A' => 2) } Method 'STORE' not found

From:
Ron Schmidt
Date:
November 3, 2011 12:52
Subject:
[perl #102876] [BUG] package A { our %h; %h{'A'} = 2 } Method 'at_key' not found - package A { our %h = ('A' => 2) } Method 'STORE' not found
Message ID:
rt-3.6.HEAD-31297-1320349922-1971.102876-82-0@perl.org
# New Ticket Created by  Ron Schmidt 
# Please include the string:  [perl #102876]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=102876 >


In both cases if you change the "our" to a "my" the problem goes away.

See on IRC: http://irclog.perlgeek.de/perl6/2011-11-03#i_4657161

UncleFester6	rakudo: package A { our %h; %h{'A'} = 2 }
	p6eval	rakudo c838c1: OUTPUT«Method 'at_key' not found for invocant of class 'Any'␤ in method postcircumfix:<{ }>  at src/gen/CORE.setting:1039␤ in<anon>  at /tmp/XrWJS1ZeNQ:1␤ in block<anon>  at /tmp/XrWJS1ZeNQ:1␤ in<anon>  at /tmp/XrWJS1ZeNQ:1␤»
	UncleFester6	rakudo: package A { my %h; %h{'A'} = 2 }
	p6eval	rakudo c838c1: ( no output )





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About