From 97117be3814c5d24f8996ca62b26c45dacf26b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kusalananda=20K=C3=A4h=C3=A4ri?= <ak4@sanger.ac.uk> Date: Thu, 24 Jul 2008 18:01:21 +0000 Subject: [PATCH] Bump $API_VERSION to 51. Reformat of get_all_db_adaptors(). --- modules/Bio/EnsEMBL/Registry.pm | 34 +++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/modules/Bio/EnsEMBL/Registry.pm b/modules/Bio/EnsEMBL/Registry.pm index 5e1ad9cc88..34d129ad02 100644 --- a/modules/Bio/EnsEMBL/Registry.pm +++ b/modules/Bio/EnsEMBL/Registry.pm @@ -119,7 +119,7 @@ use DBI; use vars qw(%registry_register); -my $API_VERSION = 50; +my $API_VERSION = 51; =head2 load_all @@ -442,25 +442,31 @@ sub get_db{ =cut -sub get_all_db_adaptors{ - my ($class,$db) = @_; - my %ret=(); +sub get_all_db_adaptors { + my ( $class, $db ) = @_; + my %ret = (); -# 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. + # 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. - foreach my $dba (@{$registry_register{'_DBA'}}){ - if(lc($dba->species()) eq lc($db->species())){ - $ret{$dba->group()} = $dba; - } + foreach my $dba ( @{ $registry_register{'_DBA'} } ) { + if ( lc( $dba->species() ) eq lc( $db->species() ) ) { + $ret{ $dba->group() } = $dba; + } } - foreach my $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}; - } + foreach my $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; -} +} ## end sub get_all_db_adaptors # -- GitLab