From 169c63598e37258f65de7bdcce575a6e388fd45a Mon Sep 17 00:00:00 2001 From: Andrew Yates <ayates@ebi.ac.uk> Date: Wed, 5 Sep 2012 12:11:38 +0000 Subject: [PATCH] Foreach better than while .. i think --- modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm index ffaa7e2924..1f1fe0e536 100755 --- a/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm @@ -178,7 +178,7 @@ sub clear_caches { my ($self) = @_; my $adaptors = Bio::EnsEMBL::Registry->get_all_adaptors( $self->species(), $self->group()); - while (my $adaptor = shift @{$adaptors}) { + foreach my $adaptor (@{$adaptors}) { if($adaptor->can('clear_cache')) { $adaptor->clear_cache(); } -- GitLab