[Bioperl-l] stymied with throw()

Aaron J Mackey Aaron J. Mackey" <amackey@virginia.edu
Thu, 11 Jul 2002 11:57:12 -0400 (EDT)


can anyone explain this:

perl -e 'sub BEGIN { $DONT_USE_ERROR = 1; } use Bio::Tools::Phylo::PAML; $paml = new Bio::Tools::Phylo::PAML -fh => \*STDIN, -dir => "./"; $paml->next_result' < data.mlc

------------- EXCEPTION Bio::Root::NotImplemented -------------
MSG: NSSitesBatch not yet implemented!
STACK Bio::Tools::Phylo::PAML::next_result /home/ajm6q/cvs/bioperl/live/Bio/Tools/Phylo/PAML.pm:241
STACK toplevel -e:1

---------------------------------------------------------------

vs (only thing changed is the DONT_USE_ERROR = 0):

perl -e 'sub BEGIN { $DONT_USE_ERROR = 0; } use Bio::Tools::Phylo::PAML; $paml = new Bio::Tools::Phylo::PAML -fh => \*STDIN, -dir => "./"; $paml->next_result' < data.mlc


------------- EXCEPTION: Bio::Root::NotImplemented -------------
MSG: 2/8
STACK: Error::throw
STACK: Bio::Root::Root::throw /home/ajm6q/cvs/bioperl/live/Bio/Root/Root.pm:317
STACK: Bio::Tools::Phylo::PAML::next_result /home/ajm6q/cvs/bioperl/live/Bio/Tools/Phylo/PAML.pm:241
STACK: -e:1
----------------------------------------------------------------

Where'd that 2/8 come from?  I've sniffed around, and can't seem to find
it.  It looks like the hash is being evaluated as a scalar somewhere ...
I'm guessing its at line 315 of Root.pm:

           throw $class ( %args || @args );

the || puts both in scalar context, I believe. - Aha it does!  OK,
committed the fix.

Not so stymied now, but I'm sending this anyway for educational purposes.

-Aaron

-- 
 Aaron J Mackey
 Pearson Laboratory
 University of Virginia
 (434) 924-2821
 amackey@virginia.edu