Graham asked:

   > IIRC there was some suggestion of a class being able to declare
   > elements to be accessable as methods in this was.
   > 
   > So if $ref is of a known type and 'a' was declared in that way,
   > the parser would take $ref.a and turn it into $ref.{a}

This is intended. I'm not sure Larry's decided the exact mechanism yet.

   > This would have the benefit of not loosing encapsulation and
   > also the performance of not having to call a method which would
   > just look like
   > 
   >   sub a(Foo $self) :lvalue { $self->{a} }
   > 
   > (Did I get that syntax right ? probably not :)


Try this:

       sub a(Foo $self) is rw { $self{a} }      # or $self.{a}

Damian

Reply via email to