Skip to content
Snippets Groups Projects
Commit 1a090ead authored by Patrick Meidl's avatar Patrick Meidl
Browse files

renamed dynamic_use() to inject()

parent 9ce5fb2c
No related branches found
No related tags found
No related merge requests found
......@@ -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;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment