Agreed. The singleton is, when you get right down to it, really just a hack to add global variables to Java in an "object-oriented" way, dignified with a fancy name and notable mainly for being the design pattern people are by far the most likely to be able to remember off the tops of their heads. There are very few cases where singletons add value in a language like Perl. If your code is worth the effort of moving away from global variables, it's worth the effort of generalising completely (for example, allowing people to have multiple data sets open at once).
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|