Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Creating 'universal' instances of objects?

by Abigail-II (Bishop)
on Aug 04, 2003 at 13:52 UTC ( [id://280675]=note: print w/replies, xml ) Need Help??


in reply to Creating 'universal' instances of objects?

So, why do you use objects in the first place? If you just want to have one instance of each class anyway, why not just use class methods, and class variables?

Abigail

  • Comment on Re: Creating 'universal' instances of objects?

Replies are listed 'Best First'.
Re: Re: Creating 'universal' instances of objects?
by halley (Prior) on Aug 04, 2003 at 16:12 UTC
    Even if current design suggests that the objects will be unique, it is still a good idea to implement such singleton classes with a single managed instance of that class. Class-oriented singleton resources would be more brittle and resistant to refactoring.

    In the future he may choose to divide global.conf into server.conf and a number of foo-module.conf, and in that case, an object-backed singleton class easily graduates as more complex structures are needed.

    --
    [ e d @ h a l l e y . c c ]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://280675]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-19 11:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found