Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Why get() and set() accessor methods are evil

by synistar (Pilgrim)
on Nov 25, 2003 at 16:46 UTC ( #309952=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package OOtest;
    sub new {
    ...
        my $self = shift;
        return $self->{list};
    }
    
  2. or download this
    my $obj = OOtest->new();
    foreach my $tmp ( @{ $obj->get_list() } ) {
        # process list
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://309952]
Approved by broquaint
Front-paged by bart
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 2022-08-09 08:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?