Perl6 Object Oriented Cookbook (v0.2.1)  
Section 7: Subclassing Built-in Types  
 
Recipe 7.3: Hash Subclasses
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 object that can be accessed like the builtin 'hash' type.

Solution:  

Inherit from the builtin type hash:

class MyClass is hash { ... }

Discussion:

(Need to document interface of hash)


Log In to Comment


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