From 2131d21a9d31c3966c0fd2c6991d8055ad4fa3ab Mon Sep 17 00:00:00 2001 From: Magali Ruffier <mr6@ebi.ac.uk> Date: Mon, 12 Aug 2013 10:05:57 +0000 Subject: [PATCH] removed 3 lines of commented out code replaced reg with registry for more explicit code --- modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm index 8719b52cb4..8374f8378a 100755 --- a/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm @@ -64,7 +64,7 @@ use Bio::EnsEMBL::Utils::Argument qw(rearrange); use Bio::EnsEMBL::Registry; use Bio::EnsEMBL::Utils::ConfigRegistry; -my $reg = "Bio::EnsEMBL::Registry"; +my $registry = "Bio::EnsEMBL::Registry"; =head2 new @@ -147,10 +147,6 @@ sub new { $self = Bio::EnsEMBL::Utils::ConfigRegistry::gen_load($self); -# if(!defined($species) ){ -# $reg->find_and_add_aliases($self); -# } - $self->species_id( $species_id || 1 ); $self->is_multispecies( defined($is_multispecies) @@ -555,7 +551,7 @@ sub add_ExternalFeatureFactory{ sub get_adaptor { my ($self, $canonical_name, @other_args) = @_; - return $reg->get_adaptor($self->species(),$self->group(),$canonical_name); + return $registry->get_adaptor($self->species(),$self->group(),$canonical_name); } @@ -580,7 +576,7 @@ sub get_adaptor { sub set_adaptor { my ($self, $canonical_name, $module) = @_; - $reg->add_adaptor($self->species(),$self->group(),$canonical_name,$module); + $registry->add_adaptor($self->species(),$self->group(),$canonical_name,$module); return $module; } @@ -895,11 +891,11 @@ sub dnadb { if(@_) { my $arg = shift; - $reg->add_DNAAdaptor($self->species(),$self->group(),$arg->species(),$arg->group()); + $registry->add_DNAAdaptor($self->species(),$self->group(),$arg->species(),$arg->group()); } # return $self->{'dnadb'} || $self; - return $reg->get_DNAAdaptor($self->species(),$self->group()) || $self; + return $registry->get_DNAAdaptor($self->species(),$self->group()) || $self; } @@ -917,7 +913,7 @@ sub AUTOLOAD { throw( sprintf( "Could not work out type for %s\n", $AUTOLOAD ) ); } - my $ret = $reg->get_adaptor( $self->species(), $self->group(), $type ); + my $ret = $registry->get_adaptor( $self->species(), $self->group(), $type ); return $ret if $ret; -- GitLab