Perl Monk, Perl Meditation | |
PerlMonks |
Re: Hash references moving between modulesby derby (Abbot) |
on Jan 10, 2003 at 17:59 UTC ( [id://225885]=note: print w/replies, xml ) | Need Help?? |
For starters, I don't understand both Bio:DB::Das::Chado and Bio::DB::Das::Chado::Segment being subclasses of Bio::Root::Root ... but besides that I also don't think this line is doing what you want:
return $self->Bio::DB::Das::Chado::Segment->new($name,$self,$start,$end); shouldn't that just be:
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):
Then at least %termhash will be a hash but quite possibly an empty one if the sql fails. -derby
In Section
Seekers of Perl Wisdom
|
|