in reply to Re^5: I hate the leading underscores.
in thread I hate the leading underscores.
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^7: I hate the leading underscores.
by TimToady (Parson) on Feb 16, 2005 at 20:31 UTC | |
by Roy Johnson (Monsignor) on Feb 16, 2005 at 20:52 UTC | |
Re^7: I hate the leading underscores.
by RazorbladeBidet (Friar) on Feb 16, 2005 at 19:13 UTC | |
by itub (Priest) on Feb 16, 2005 at 19:37 UTC | |
by Roy Johnson (Monsignor) on Feb 16, 2005 at 19:32 UTC |