From 5c965f5e3afbe31703f6ee920ad98f28c18f6c66 Mon Sep 17 00:00:00 2001
From: Monika Komorowska <mk8@sanger.ac.uk>
Date: Wed, 22 Jun 2011 14:52:11 +0000
Subject: [PATCH] Test for dependencies on Variation, Funcgen or Compara
 modules in Core modules.

---
 modules/t/dependencies.t | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 modules/t/dependencies.t

diff --git a/modules/t/dependencies.t b/modules/t/dependencies.t
new file mode 100644
index 0000000000..f291860a84
--- /dev/null
+++ b/modules/t/dependencies.t
@@ -0,0 +1,38 @@
+
+use strict;
+use warnings;
+
+
+use Bio::EnsEMBL::Test::TestUtils;
+
+
+BEGIN { $| = 1;
+	use Test;
+	plan tests => 1;
+}
+
+#test for dependencies on Variation, Compara and Funcgen APIs
+
+my @result = `egrep -r "use Bio::EnsEMBL::(Variation|Compara|Funcgen){1}" ../Bio/EnsEMBL/`;
+
+my %result = map{$_ => 1} @result;
+
+my @exceptions = ('/Bio/EnsEMBL/Utils/TranscriptAlleles.pm', 
+   	       	 '/Bio/EnsEMBL/Utils/ensembl_init.example');
+
+my $exceptions = join("|",@exceptions);
+$exceptions =~ s/\//\\\//g;
+
+
+foreach my $key (keys %result) {
+	if ( $key =~ /($exceptions)/ ) {
+	   delete($result{$key});
+	}
+}
+
+ok(!%result);
+
+if (%result) { 
+   warn "Dependencies found in the following files:\n";
+   warn keys %result;
+}
-- 
GitLab