Skip to content
Browse files

flybase changed the format of their GO cofiguration reporting. Changi…

…ng parser to compensate

svn path=/bioperl-gui/trunk/; revision=771
  • Loading branch information...
1 parent da01bbc commit 917bd6c6c885ce8463ad3ac629f488458eeb3eb1 mwilkinson committed Jul 14, 2003
Showing with 8 additions and 7 deletions.
  1. +8 −7 Bio/Tk/GO_Browser.pm
View
15 Bio/Tk/GO_Browser.pm
@@ -345,22 +345,23 @@ sub new {
unless ($self->host){
my $ua = new LWP::UserAgent;
my $req = new HTTP::Request GET => 'http://www.godatabase.org/dev/database/server.cfg';
- #$req->content('match=www&errors=0');
+ #$req->content('match=www&errors=0');
my $res = $ua->request($req);
- if ($res->is_success) {
- my $resp = $res->content;
+ if ($res->is_success) {
+ my $resp = $res->content;
unless ($self->host){
- my $host = ($resp =~ /\w+\s+(.*)/ && $1);
- $self->host($host)
+ if ($resp =~ /(\w+)\@(\S+)/){
+ $self->host($2);
+ $self->dbname($1);
+ }
}
}
unless ($self->host){
warn "unable to determine host name from BDGP website\n";
return 0;
- }
+ }
}
-
my %connect_hash;
if ($self->dbname){$connect_hash{-dbname}=$self->dbname}
if ($self->host){$connect_hash{-dbhost}=$self->host}

0 comments on commit 917bd6c

Please sign in to comment.
Something went wrong with that request. Please try again.