Carl Mäsak via RT wrote:
On Sun Mar 21 14:33:26 2010, lue wrote:
class A { has $.b; method x { $!b = "b" } }; A.new.x

this works.

Sure, but that doesn't create a class attribute, as was the topic of this ticket. :) The 'has' declarator gives each object instance its own attribute, whereas the ordinary 'my' declarator in a class scope creates a class-wide attribute.
AFAIK, it's just syntactic sugar for declaring a lexical variable and generating an l-value method related to it. It doesn't create a $!foo, but a $foo. A $!foo is always unambiguously an instance attribute.

Jonathan

Reply via email to