Skip to content
Snippets Groups Projects
Commit 97117be3 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Bump $API_VERSION to 51.

Reformat of get_all_db_adaptors().
parent 638da2c1
No related branches found
No related tags found
No related merge requests found
...@@ -119,7 +119,7 @@ use DBI; ...@@ -119,7 +119,7 @@ use DBI;
use vars qw(%registry_register); use vars qw(%registry_register);
my $API_VERSION = 50; my $API_VERSION = 51;
=head2 load_all =head2 load_all
...@@ -442,25 +442,31 @@ sub get_db{ ...@@ -442,25 +442,31 @@ sub get_db{
=cut =cut
sub get_all_db_adaptors{ sub get_all_db_adaptors {
my ($class,$db) = @_; my ( $class, $db ) = @_;
my %ret=(); my %ret = ();
# we now also want to add all the DBAdaptors for the same species. # we now also want to add all the DBAdaptors for the same species.
# as add_db_adaptor does not add if it is from the same species. # as add_db_adaptor does not add if it is from the same species.
foreach my $dba (@{$registry_register{'_DBA'}}){ foreach my $dba ( @{ $registry_register{'_DBA'} } ) {
if(lc($dba->species()) eq lc($db->species())){ if ( lc( $dba->species() ) eq lc( $db->species() ) ) {
$ret{$dba->group()} = $dba; $ret{ $dba->group() } = $dba;
} }
} }
foreach my $key (keys %{$registry_register{$class->get_alias($db->species())}{lc($db->group())}{'_special'}}){ foreach my $key (
$ret{$key} = $registry_register{$class->get_alias($db->species())}{lc($db->group())}{'_special'}{$key}; keys %{
} $registry_register{ $class->get_alias( $db->species() ) }
{ lc( $db->group() ) }{'_special'} } )
{
$ret{$key} =
$registry_register{ $class->get_alias( $db->species() ) }
{ lc( $db->group() ) }{'_special'}{$key};
}
return \%ret; return \%ret;
} } ## end sub get_all_db_adaptors
# #
......
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