Do you know where your variables are? | |
PerlMonks |
Re^2: Elegant way to dereference an array or hash?by waswas-fng (Curate) |
on Nov 17, 2004 at 01:23 UTC ( [id://408298]=note: print w/replies, xml ) | Need Help?? |
I have worked on tons of legacy code that used typeglobs in this way, one thing I can suggest is a var prefix that is standardized across the codebase. It makes it a lot easier to trace things out if you are looking at $tgl_varname or some such vs $randomname when the typeglob alias is created half way across a large sub or file. Also IMHO the long form deref is better all around as it does not introduce one more var name to keep track of in my tiny head.
-Waswas
In Section
Seekers of Perl Wisdom
|
|