From 91eb42898823fc7d188b8f4b2dbcdb959192276c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20Kusalananda=20K=C3=A4h=C3=A4ri?=
 <ak4@sanger.ac.uk>
Date: Tue, 30 Aug 2011 12:49:43 +0000
Subject: [PATCH] Fix undef warning in load_all().

---
 modules/Bio/EnsEMBL/Registry.pm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/Bio/EnsEMBL/Registry.pm b/modules/Bio/EnsEMBL/Registry.pm
index a76cca1a0a..2853558612 100644
--- a/modules/Bio/EnsEMBL/Registry.pm
+++ b/modules/Bio/EnsEMBL/Registry.pm
@@ -197,8 +197,13 @@ my %group2adaptor = (
 sub load_all {
     my ($class, $config_file, $verbose, $no_clear, $no_cache ) = @_;
 
-    $config_file ||= $ENV{ENSEMBL_REGISTRY}
-      || $ENV{HOME} . "/.ensembl_init";
+    if ( !defined($config_file) ) {
+      if ( defined( $ENV{ENSEMBL_REGISTRY} ) ) {
+        $config_file = $ENV{ENSEMBL_REGISTRY};
+      } elsif ( defined( $ENV{HOME} ) ) {
+        $config_file = $ENV{HOME} . "/.ensembl_init";
+      }
+    }
 
     $verbose  ||= 0;
     $no_clear ||= 0;
-- 
GitLab