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 support
It 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.


Caution: Contents may have been coded under pressure.

In reply to Re^8: I hate the leading underscores. by Roy Johnson
in thread I hate the leading underscores. by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.