Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Overriding bless for inside-out object safety

by xdg (Monsignor)
on Jan 04, 2006 at 16:33 UTC ( [id://520952]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package My::Class;
    
    ...
      bless $self, $class;
    }
    
  2. or download this
    my $REGISTRY;
    
    ...
      $REGISTRY{ $_[1] }{ refaddr $_[0] } = $_[0];
      return $_[0];
    }
    
  3. or download this
    my $NAME_OF{ id $self } = "Larry";
    
    # instead of
    
    my $NAME_OF{ refaddr $self } = "Larry";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://520952]
Approved by Limbic~Region
Front-paged by astaines
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-16 15:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found