Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: •Re: Why get() and set() accessor methods are evil

by Juerd (Abbot)
on Nov 26, 2003 at 22:44 UTC ( [id://310401]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $object = SomeClass->new(digits => '123');
    
    ...
    
    $john->age++;
    printf "%s is now %d years old", $john->name, $john->age;
    
  2. or download this
    Old:
    $john->age($john->age + 1);
    ...
    New:
    $john->age++;
    $john->name =~ s/Doe/Smith/;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://310401]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-19 23:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found