Commit bf4e040c authored by Leo Gordon's avatar Leo Gordon
Browse files

be laconic :)

parent 79d8611c
...@@ -618,7 +618,7 @@ sub serverroot { ...@@ -618,7 +618,7 @@ sub serverroot {
sub get_database { sub get_database {
my $self = shift; my $self = shift;
my $database = shift or throw("You must provide a database"); my $database = shift or throw("You must provide a database");
my $prefix = shift; my $prefix = shift || '';
$self->check_required_params( $self->check_required_params(
"${prefix}host", "${prefix}host",
"${prefix}port", "${prefix}port",
...@@ -635,8 +635,7 @@ sub get_database { ...@@ -635,8 +635,7 @@ sub get_database {
vega => 'Bio::Otter::DBSQL::DBAdaptor', vega => 'Bio::Otter::DBSQL::DBAdaptor',
compara => 'Bio::EnsEMBL::DBSQL::DBAdaptor', compara => 'Bio::EnsEMBL::DBSQL::DBAdaptor',
); );
my %valid = map { $_ => 1 } keys %adaptors; throw("Unknown database: $database") unless $adaptors{$database};
throw("Unknown database: $database") unless $valid{$database};
$self->dynamic_use($adaptors{$database}); $self->dynamic_use($adaptors{$database});
my $dba = $adaptors{$database}->new( my $dba = $adaptors{$database}->new(
......
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