Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Parser object to return different objects

by Roger (Parson)
on Sep 02, 2005 at 00:48 UTC ( #488519=note: print w/replies, xml ) Need Help??


in reply to Parser object to return different objects

it is impossible to say what is returned by the parser

That's not true though, you can tell what type of the object it is by inspecting the ref of the object returned.

I think your suggestion is workable. Perhaps you want to consider making -I_want switch optional. A more convenient interface would be a standardised approach for every file types, something like...
use Bio::Phylo::Parsers; my $parser = new Bio::Phylo::Parsers; my $collection = $parser->parse( -format => $format, -file => $filenam +e , -I_want => qw/ trees / ); # I_want is optional for my $obj (@$collection) { .... }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://488519]
help
Chatterbox?
[Lady_Aleena]: shmem, there is ONE song which throws a wrench in the works for both MP3::Info and MP3::Tag.
[shmem]: Lady_Aleena: fix it, or delete it ;-)
[Lady_Aleena]: shmem, I'm not sure how.
[shmem]: well, deleting is done with 'rm' :-P
[shmem]: you can break up the chain MP3::Tag->new($_)- >interpolate("\%S ") and test whether MP3::Tag->new($_) is true
[Lady_Aleena]: shmem, no to deletion.

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2017-04-23 22:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (432 votes). Check out past polls.