in reply to Re^4: Thoughts on new 'class' OO in upcoming perl
in thread Thoughts on new 'class' OO in upcoming perl

Indeed, I guess that this design decision could be a major obstacle for adoption of the new core OO. It is a consequence of the intended encapsulation of classes: Fields without accessors are private to the class, and different classes (and roles) in a class hierarchy can use the same field name without conflicts.

There have been lengthy discussions about allowing subclasses direct access with an explicit "opt-in" mechanism (similar to protected in Java), and I would love to see that. However, this will not happen in the first version of core OO.

  • Comment on Re^5: Thoughts on new 'class' OO in upcoming perl