Daniel McBrearty wrote:
And I don't see why a singleton is not a proper object; it hides it's
implementation from the outside, encapsulates data and code, presents
an API which can be used to control or restrict the way it is used,
and so on. The fact that the number of instances is limited is neither
here nor there. Are there no real world classes of objects of which
there are only one instance?

Let's return to the case in point:

If you use a singleton pattern in ANY library which will be reused in a "mod_perl-style" context then it breaks, because there might be more than one completely separate application running in the same perl namespace.

And since ANY library in CPAN might be re-used in this context, you should never do it.

Case (IMO) closed.



_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to