[Bioperl-l] Bio::Root::IO reads URLs from -file

James Thompson tex at biosysadmin.com
Mon Aug 9 20:48:03 EDT 2004

As a newbie/lazy coder, it may be a bit more polite to try and open things
that look like URLs, but I can't imagine many situations in which having a url
masquerading as a file would be that useful.

It seems more correct to just throw a helpful exception saying "Error: Can't
open file, is it a URL?" if the -file arg looks URLish. It really makes more
sense to me to keep -file's and -url's as separate concepts.

Tex Thompson
RIT Bioinformatics

On Sun, 8 Aug 2004, Allen Day wrote:

> just commited this to cvs.  if you pass a -file arg to a Root::IO 
> subclass, the following happens:
> if(the file exists){
>   do as before
> }
> elsif(the file doesn't exist, and the name looks like a url) {
>   try a few times to {
>     download the url to a local tempfile, and update -file to point
>     to the tempfile
>   }
>   if(couldn't download the file){
>     throw an error
>   }
> }
> i'm open to moving urls to a special -url argument instead of overloading 
> -file.  what do people think?
> -allen
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l

More information about the Bioperl-l mailing list