diff options
Diffstat (limited to 'lib/OpenSLX/Utils.pm')
-rw-r--r-- | lib/OpenSLX/Utils.pm | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/lib/OpenSLX/Utils.pm b/lib/OpenSLX/Utils.pm index ef4c1cac..d86167a2 100644 --- a/lib/OpenSLX/Utils.pm +++ b/lib/OpenSLX/Utils.pm @@ -21,7 +21,7 @@ $VERSION = 1.01; @ISA = qw(Exporter); @EXPORT = qw( - ©File &fakeFile &linkFile &slurpFile &instantiateClass + ©File &fakeFile &linkFile &slurpFile ); ################################################################################ @@ -86,26 +86,4 @@ sub slurpFile return $text; } -sub instantiateClass -{ - my $class = shift; - my $requestedVersion = shift; - - unless (eval "require $class") { - if ($! == 2) { - die _tr("Class <%s> not found!\n", $class); - } else { - die _tr("Unable to load class <%s> (%s)\n", $class, $@); - } - } - if (defined $requestedVersion) { - my $classVersion = $class->VERSION; - if ($classVersion < $requestedVersion) { - die _tr('Could not load class <%s> (Version <%s> required, but <%s> found)', - $class, $requestedVersion, $classVersion); - } - } - return $class->new; -} - 1;
\ No newline at end of file |