Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Why is a hash the default "object" in oo perl?

by theAcolyte (Pilgrim)
on Jul 17, 2004 at 22:22 UTC ( #375293=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    { my $age; sub age {
        my $self = shift;
        return $age unless @_;
        $age = shift;
    }}
    
  2. or download this
    { my %agedata; sub age {
       my $self = shift;
       return $age{$self} unless @_;
       $age{$self} = shift;
    }}
    
  3. or download this
    {{ my $variable } sub accessor {
          ....
    }}
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://375293]
Approved by Corion
Front-paged by grinder
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-08-30 18:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls