Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Better Inside-Out Objects :)

by Ovid (Cardinal)
on Oct 06, 2006 at 16:36 UTC ( #576707=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Encapsulation;
    
    sub new {
    ...
    }
    
    1;
    
  2. or download this
    #!/usr/bin/perl
    
    use strict;
    ...
    is $o->foo, 42, "secrets of different classes do not interfere";
    
    ok !defined $o->{secret}, 'cannot reach into objects';
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2019-08-25 02:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?