I do know what a singleton is, but thanx for that pointer. I got the idea to use the local copy of I had originally just copied the data used in the users junk to the module. but even when i used this constructor:
sub new
{
my $class = shift;
my $self = {};
return bless $self, $class;
}
It actually did not work at all. Besides, the second simplest constructor in the perl cookbook was
sub new{ bless({},shift);}
I saw that in the reference they had shifted off of
$self for every function, but as I said earlier I was just copying the code to local vars and only now realize that I can only have one instance of the class if I do that. Yes I realize how to shift of
$self, but even when I had all the things that were just descibed, I still could not call the functions like this:
$foo->name("straywalrus");. Instead I had to call every function with the class name preceding the function name with the C++ scope operators betwixt the two ( I have no idea what the scope "::" operator is called in Perl). Every call was made like it was shown in the test program. Surely there is a way to correct this, even though I shift off
$self and do as was above described. Thanx
straywalrus