i guess I am hugely confuse about when to use $self->...
in the first reply to my question, the code uses the
%serverMap directly in each of the methods.. i guess because i define it outside all methods, it is visible???...
but in yours, you use $self to access to it.
another question of mine: i se eyou make a new constructor (more compact one), but
don't quite get what it does? your decision for the change? my original verison has this package @ISA CLASS::Singleton...
to prevent users of this class to have more than 1 copy of serverMap
.. but from your comment in your psot, is that step necessary anymore? thanks

In reply to Re^3: how to code a class and use it with hash of hash as data member? by edwardt_tril
in thread how to code a class and use it with hash of hash as data member? by edwardt_tril

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.