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.
In reply to Re: Thread-safe singleton in perl
by renodino
in thread Thread-safe singleton in perl
by Saladino
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |