diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-08-02 05:07:48 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-08-02 05:07:48 +0000 |
commit | 658c477f1ea4b2f6e6b2370561dbde383a33bdb7 (patch) | |
tree | 0c647cd6847ed4bc11ddcd60db6e60cb2098faa1 /MDK/Common/System.pm | |
parent | 2b9fcc72ed97ec345a0769817e13379a98a02862 (diff) | |
download | perl-MDK-Common-658c477f1ea4b2f6e6b2370561dbde383a33bdb7.tar perl-MDK-Common-658c477f1ea4b2f6e6b2370561dbde383a33bdb7.tar.gz perl-MDK-Common-658c477f1ea4b2f6e6b2370561dbde383a33bdb7.tar.bz2 perl-MDK-Common-658c477f1ea4b2f6e6b2370561dbde383a33bdb7.tar.xz perl-MDK-Common-658c477f1ea4b2f6e6b2370561dbde383a33bdb7.zip |
MDK::Common::System: whereis_binary() can now handle prefix
Diffstat (limited to 'MDK/Common/System.pm')
-rw-r--r-- | MDK/Common/System.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MDK/Common/System.pm b/MDK/Common/System.pm index 22894b3..3b21a9d 100644 --- a/MDK/Common/System.pm +++ b/MDK/Common/System.pm @@ -290,14 +290,14 @@ sub gettimeofday() { my $t = pack "LL"; syscall_('gettimeofday', $t, 0) or die " sub unix2dos { local $_ = $_[0]; s/\015$//mg; s/$/\015/mg; $_ } sub whereis_binary { - my ($prog) = @_; + my ($prog, $o_prefix) = @_; if ($prog =~ m!/!) { warn qq(don't call whereis_binary with a name containing a "/" (the culprit is: $prog)\n); return; } foreach (split(':', $ENV{PATH})) { my $f = "$_/$prog"; - -x $f and return $f; + -x "$o_prefix$f" and return $f; } } |