Commit d0438088 authored by Jessica Severin's avatar Jessica Severin
Browse files

made logic for DBConnection url a little smarter

parent 68bf9ff4
......@@ -80,10 +80,15 @@ sub Bio::EnsEMBL::Analysis::runnableDB
sub Bio::EnsEMBL::DBSQL::DBConnection::url
{
my $self = shift;
return undef unless($self->host and $self->username and $self->password and $self->dbname);
return "mysql:://". $self->username .":". $self->password
."@". $self->host .":". $self->port ."/" . $self->dbname;
return undef unless($self->host and $self->port and $self->dbname);
my $url = "mysql://";
if($self->username) {
$url .= $self->username;
$url .= ":".$self->password if($self->password);
$url .= "@";
}
$url .= $self->host .":". $self->port ."/" . $self->dbname;
return $url;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment