Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Your favorite objects NOT of the hashref phylum (array w/ consts)by tye (Sage) |
on Mar 23, 2006 at 20:43 UTC ( [id://538858]=note: print w/replies, xml ) | Need Help?? |
I prefer a ref to a blessed array with constants noting which member data is stored at which array index:
You can get compile-time catching of mispelt attribute names, faster and more compact objects, minimal increase in code complexity. Updated: Dropped the extra "my" inside the BEGIN block as pointed out by vhold (Thanks!). - tye
In Section
Seekers of Perl Wisdom
|
|