Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Don't ask to ask, just ask
 
PerlMonks  

A different OO approach

by fruiture (Curate)
on Dec 13, 2002 at 19:55 UTC ( #219728=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package OO;
    use strict;
    use warnings;
    use Carp qw/croak/;
    
  2. or download this
    #--------------------------------------------------------------------
    #       The registry itself: storing all the data of your objects
    ...
    
    # Object => Class => Attribute
    
  3. or download this
    #--------------------------------------------------------------------
    #       inheritable constructor with generalized behaviour
    ...
    
            return $self;
    }
    
  4. or download this
    #--------------------------------------------------------------------
    #       Use these two methods to get and set members of your
    ...
    
            $Object{ $obj }{ $class }{ $field } = $value;
    }
    
  5. or download this
    #--------------------------------------------------------------------
    #       most important: DESTROY
    ...
    
            delete $Object{ $obj } #that's why the structure of the regist
    +ry was chosen like that
    }
    
  6. or download this
    #--------------------------------------------------------------------
    #       create_accessor class method to create simple accessor/mutator
    + methods
    ...
                    }
            }
    }
    
  7. or download this
    #--------------------------------------------------------------------
    #       debugging function/method (as you like it)
    ...
    }
    
    1;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://219728]
Approved by Tanalis
Front-paged by Tanalis
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2014-04-20 12:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls