# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #58826] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58826 >
Rakudo r31066 works under the assumption that the absence of "is rw" on attributes means that they cannot be modified, period. This reduces their utility somewhat. $ ./perl6 -e 'class A { has $.x is rw; method a { $.x = 5; } }; A.new.a' # works $ ./perl6 -e 'class A { has $.x; method a { $.x = 5; } }; A.new.a' # fails Cannot assign to readonly variable [...] $ ./perl6 -e 'class A { has $.x; method a { $!x = 5; } }; A.new.a' # this works, though My intiution about this may be off, but I read "is rw" as "not _publicly_ writeable". I think even a non-rw attribute should be changeable from within its own class. (Substituting a "%.h" for the "$.x" causes another segmentation fault in the failing case, by the way.)