![]() |
|
go ahead... be a heretic | |
PerlMonks |
Re^3: Class::Accessor and Damian's PBPby acid06 (Friar) |
on Feb 23, 2006 at 15:15 UTC ( #532285=note: print w/replies, xml ) | Need Help?? |
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 $="
In Section
Seekers of Perl Wisdom
|
|