Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Class::Accessor and Damian's PBP

by acid06 (Friar)
on Feb 23, 2006 at 15:15 UTC ( #532285=note: print w/replies, xml ) Need Help??


in reply to Re^2: Class::Accessor and Damian's PBP
in thread Class::Accessor and Damian's PBP

The simple and common approach is to store properties as keys in a hash but this leads to hard-to-find bugs resulting from typos in hash keys. Generating accessors is an effective way to eliminate that class of error.
Have you already tried to use fields;?
Not that I dislike accessors, but I think this is not the exact reason why they're good.


acid06
perl -e "print pack('h*', 16369646), scalar reverse $="

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2019-10-19 06:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?