Perl6 Object Oriented Cookbook (v0.2.1)  
Section 2: Attributes and Methods  
 
Recipe 2.5: Creating 'Class-Specific' Attributes
Last Updated: Sep 8, 2003
Status: Draft
      Previous Page   Next Page

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

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

Problem:  

You want to create an attribute that is the same for all instances of a class, but is not the same for each subclass: for example, you want to keep a count of how many times an object is instantiated, and separate counts that track how many times each of its subclasses is instantiated.

Solution:  

Discussion:


Log In to Comment


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