Do you have a link to that?In perldoc perlmod, Larry laid out the conceptual basis of OO for Perl.
Perl does not enforce private and public parts of its modules as you may have been used to in other languages like C++, Ada, or Modula-17. Perl doesn't have an infatuation with enforced privacy. It would prefer that you stayed out of its living room because you weren't invited, not because it has a shotgun.
it's the incomplete OO supportIt is a misconception that strong data hiding is integral to OO, just as it is a misconception that strong data typing is integral to programming languages. The language is to serve the programmer, not to handcuff him.
Calling an undocumented method is not an easy mistake to make. If some programmer does that, it's most likely intentional. The programmer is violating OO programming guidelines, it is not the language's fault for letting him do something that isn't OO.
That said, here is what I think is a kind of clever way to hide private methods. Wow, was that not a good idea. There shouldn't be private methods, just private subs. And the easy way to hide them is to make them lexical coderefs.
In reply to Re^8: I hate the leading underscores.
by Roy Johnson
in thread I hate the leading underscores.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |