tempfoo has asked for the wisdom of the Perl Monks concerning the following question:
What would be the most efficient way to share a blessed reference among two or more objects?
For example, in main.pl I declare:
use Registry; use Queue; my $reg=Registry->new; my $queue=Queue->new;
Registry object stores configuration data for both main.pl and Queue.pm. I want $queue to access $reg, but not by means of use Registry inside package Queue, because I don't want to have more than one instance of Registry. How could I do it? Thanks in advance for any pointers, suggestions...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Most efficient way to share blessed refence among packages
by sauoq (Abbot) on Oct 25, 2002 at 21:46 UTC | |
|
Re: Most efficient way to share blessed refence among packages
by gjb (Vicar) on Oct 25, 2002 at 21:46 UTC | |
|
Re: Most efficient way to share blessed refence among packages
by robartes (Priest) on Oct 25, 2002 at 21:51 UTC |