Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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

by Juerd (Abbot)
on Nov 26, 2003 at 22:44 UTC ( #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
Node Status?
node history
Node Type: note [id://310401]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2021-01-23 08:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?