in reply to Hash references moving between modules
return $self->Bio::DB::Das::Chado::Segment->new($name,$self,$start,$end);
shouldn't that just be:
return Bio::DB::Das::Chado::Segment->new($name,$self,$start,$end);
Other than that, are you sure your sql is returning results? If your sql fails, $cvterm_id will never be converted to a hash reference (it will stay a plain scalar) and your code downstream will fail. You probably want something like this to protect the code downstream (or you could check if you have a hash downline):
my $cvterm_id = {} ; # this scalar is a hashref while (my $hashref = $sth->fetchrow_hashref) { $$cvterm_id{$$hashref{termname}} = $$hashref{cvterm_id}; }
Then at least %termhash will be a hash but quite possibly an empty one if the sql fails.
-derby
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Hash references moving between modules
by scain (Curate) on Jan 10, 2003 at 18:18 UTC |