Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Haha, great etymological humor in that Wikipedia link.
A point of clarification... this fails at compile-time: $comments_ref[0] = 'foo'; # 2 ... while this fails at runtime (assuming that $comments doesn't contain a ref, as implied by the lack of HungDamian suffix): $comments->[0] = 'foo'; # 3 I hadn't addressed the situation where a spurious dereferencing operator causes problems, but yes, now that I think about it, I've done that every once in a while. Depending on how rarely the code branch containing the bogus arrow gets accessed, that might produce an unpleasant surprise at an inopportune moment. Fortunately, thanks to Data::Alias, I can have my spinach and eat it too. I'm persuaded. I'll start using _ref. But those hash names are going to stay plural for now. Cheers, --
In reply to Re^2: Perl Best Practices for naming variables
by creamygoodness
|
|