Perl6 Object Oriented Cookbook (v0.2.1)  
Section 10: Limiting Access to Classes, Attributes, and Methods  
 
Recipe 10.3: Creating an Attribute or Method that is Public to a Class and its Subclasses
Last Updated: Sep 8, 2003
Status: Draft
      Previous Page   Next Page

How important is this problem to you?
  (Login to Vote)
2.00 Rating, 1 Vote  

How acceptable is the proposed solution?
  (Login to Vote)
0.00 Rating, 0 Votes  

Problem:  

You want to declare an attribute or method with permissions "in-between" public and private. Specifically, you want to create an attribute or method that this class, and any subclasses that inherit from this class, may use, but you don't want nonrelated classes or code to access it.

Solution:  

Discussion:

Issue: The infamous "protected" access.


Log In to Comment


Login / Edit User Info -- Copyright © 2002 Cognitivity -- Previous Page   Next Page