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,
--
Marvin Humphrey
Rectangular Research
http://www.rectangular.com
In reply to Re^2: Perl Best Practices for naming variables
by creamygoodness
in thread Perl Best Practices for naming variables
by creamygoodness
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |