summaryrefslogtreecommitdiffstats
path: root/lib/OpenSLX/Utils.pm
diff options
context:
space:
mode:
authorDirk von Suchodoletz2008-12-17 17:39:51 +0100
committerDirk von Suchodoletz2008-12-17 17:39:51 +0100
commite335b2132f6c9508861c01cda50ce8734b872b4e (patch)
treec51828ae7eb73b34af8deec0fbe2e8ecfdf2b617 /lib/OpenSLX/Utils.pm
parentMore general location of helper functions (to check if a certain (diff)
downloadcore-e335b2132f6c9508861c01cda50ce8734b872b4e.tar.gz
core-e335b2132f6c9508861c01cda50ce8734b872b4e.tar.xz
core-e335b2132f6c9508861c01cda50ce8734b872b4e.zip
Trying to simplify stuff in plugins (checks if a certain package
is installed and installing ...) git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2427 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'lib/OpenSLX/Utils.pm')
-rw-r--r--lib/OpenSLX/Utils.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/OpenSLX/Utils.pm b/lib/OpenSLX/Utils.pm
index dbc35270..9686a152 100644
--- a/lib/OpenSLX/Utils.pm
+++ b/lib/OpenSLX/Utils.pm
@@ -688,4 +688,18 @@ sub isInPath
return $path ? 1 : 0;
}
+=item B<isPackInstalled()>
+
+Check whether a certain package is installed. Could be refined somehow to use
+the package mechanism of the given distribution!?
+
+=cut
+
+sub isPackInstalled
+{
+ my $self = shift;
+ my $pack = shift;
+ return $self->isInPath($pack);
+}
+
1;