Does anyone else hate the way method names with leading underscores look?
Personally I don't, but then again it's just a matter of personal preference. Just the other day I wrote some code that used a dispatch table and since the involved subs were not really trivial nor "minimal" I wrote them separately as named subs and put in the table references to them. Even if they were not methods of a class, since they were coneceptually somewhat "private" to the table, I used names with leading underscores for them. I find it quite natural...

UPDATE: In an even different situation in which I want a "private portion of a namespace" since I'm only using it as an "anonymous tool" I still use those leading underscores, e.g.:

sub is { return bless \shift, '_hidden'; } sub _hidden::in { my $s=${shift,}; $s eq $_ and return 1 for @_; 0; }

In reply to Re: I hate the leading underscores. by blazar
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.