Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Thread-safe singleton in perl

by renodino (Curate)
on Mar 19, 2008 at 19:26 UTC ( #675076=note: print w/replies, xml ) Need Help??


in reply to Thread-safe singleton in perl

my problem now is that I've to share the object reference and threads::shared doesn't allow that.

Care to elaborate on that ? I've certainly used shared objects on numerous occasions. (There is a small gotcha related to DESTROY that has a fix in perl 5.10 + latest CPAN version of threads::shared).

Presumably, you simply need to bless a shared variable for the object. See threads::shared Objects description for details.


Perl Contrarian & SQL fanboy

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://675076]
help
Chatterbox?
[erix]: re: ORMs: sql can easily have many where-clauses so then you'll have to start parsing -- not so easy

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (11)
As of 2017-09-25 12:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (280 votes). Check out past polls.

    Notices?