From 1a090ead049dc361ad21f1bd563bd1f5e183db5b Mon Sep 17 00:00:00 2001
From: Patrick Meidl <pm2@sanger.ac.uk>
Date: Wed, 23 Apr 2008 15:20:40 +0000
Subject: [PATCH] renamed dynamic_use() to inject()

---
 modules/Bio/EnsEMBL/Utils/ScriptUtils.pm | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/modules/Bio/EnsEMBL/Utils/ScriptUtils.pm b/modules/Bio/EnsEMBL/Utils/ScriptUtils.pm
index 11935f3952..d608fb40cf 100644
--- a/modules/Bio/EnsEMBL/Utils/ScriptUtils.pm
+++ b/modules/Bio/EnsEMBL/Utils/ScriptUtils.pm
@@ -43,6 +43,7 @@ our @EXPORT_OK = qw(
   directory_hash
   path_append
   dynamic_use
+  inject
 );
 
 
@@ -221,10 +222,10 @@ sub path_append {
 }
 
 
-=head2 dynamic_use
+=head2 inject
 
   Arg [1]    : String $classname - The name of the class to require/import
-  Example    : $self->dynamic_use('Bio::EnsEMBL::DBSQL::DBAdaptor');
+  Example    : $self->inject('Bio::EnsEMBL::DBSQL::DBAdaptor');
   Description: Requires and imports the methods for the classname provided,
                checks the symbol table so that it doesnot re-require modules
                that have already been required.
@@ -234,7 +235,7 @@ sub path_append {
 
 =cut
 
-sub dynamic_use {
+sub inject {
   my $classname = shift;
   my ($parent_namespace, $module) = $classname =~/^(.*::)(.*)$/ ?
                                       ($1,$2) : ('::', $classname);
@@ -251,5 +252,10 @@ sub dynamic_use {
   return 1;
 }
 
+
+sub dynamic_use {
+  return inject(@_);
+}
+
 1;
 
-- 
GitLab