Saron has asked for the wisdom of the Perl Monks concerning the following question:
Everything works well. Until I add a second instance of my object class.package HIT; sub new { my $class = shift; my $class = ref($class) || $class; my $self = {}; $self->{Name} = "Default"; $self->{Length} = 0; $self->{Score} = 0; $self->{Expect} = 0; $self->{Ident} = "Default"; $self->{Strand} = "Default"; $self->{Match} = "Deafult"; bless ($self,$class); return $self; }
ie $a = new HIT; $b = new HIT;
I have some methods that change each of these variables, only they change BOTH not just one.
Any ideas? I have searched and read FAQ's!
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Object troubles
by Abigail (Deacon) on Jul 15, 2000 at 13:46 UTC | |
|
RE: Object troubles
by toadi (Chaplain) on Jul 13, 2000 at 15:43 UTC |