|No such thing as a small change|
Re^2: Perl Best Practices for naming variablesby creamygoodness (Curate)
|on Aug 07, 2005 at 05:12 UTC||Need Help??|
Haha, great etymological humor in that Wikipedia link.
A point of clarification... this fails at compile-time:
$comments_ref = 'foo'; # 2
... while this fails at runtime (assuming that $comments doesn't contain a ref, as implied by the lack of HungDamian suffix):
$comments-> = '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.