Not quite - not documenting them is just one way to hide variables.It is the official Perl way, as envisioned by Larry Wall. (I should have said "members" rather than "variables". Hiding variables is done by scoping.) Any other technique used to hide private methods and members constitutes an attempt to write C++ (or some other language) in Perl.
it makes placing an underscore before a private variable a secondary security measureIt's really just a flag to help the module author (and any developer with prying eyes) keep things straight. Nothing more. I agree that it's a good convention.
In reply to Re^6: I hate the leading underscores.
by Roy Johnson
in thread I hate the leading underscores.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |