[Bioperl-l] EUtilities term handling

Chris Fields cjfields at uiuc.edu
Thu Oct 5 13:45:40 EDT 2006


On Oct 5, 2006, at 11:28 AM, Sendu Bala wrote:

> I'm not sure how not doing URI-encoding would suddenly make your  
> classes worthless. I find them to be very useful (even when I  
> didn't know there was any URI-encoding, was incorrectly using +s  
> and it happened to work anyway).

That's not my point (and sincerest apologies for the 'badgering'  
bit).  If you made the assumption that all the parameters had to be  
URI-encoded, why couldn't I do something like:

my %param = (#make up your list of parameters here#);
my $eutil = 'esearch';
my $url = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/$eutil.fcgi";
# join the key value pairs with '=', then join all those with &
# add to end of url
# post and retrieve via LWP::Simple

It's more user-friendly to set up the parameters so that you wouldn't  
have to encode everything yourself, esp. when the most reliable way  
to encode URI strings is to 'use URI'.

Christopher Fields
Postdoctoral Researcher
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign





More information about the Bioperl-l mailing list