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 | |
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')
-rw-r--r-- | MDK/Common.pm.pl | 2 | ||||
-rw-r--r-- | MDK/Common/System.pm | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/MDK/Common.pm.pl b/MDK/Common.pm.pl index 07198f5..ba7a989 100644 --- a/MDK/Common.pm.pl +++ b/MDK/Common.pm.pl @@ -74,7 +74,7 @@ use vars qw(@ISA @EXPORT $VERSION); #); # perl_checker: RE-EXPORT-ALL @EXPORT = map { @$_ } map { values %{'MDK::Common::' . $_ . 'EXPORT_TAGS'} } grep { /::$/ } keys %MDK::Common::; -$VERSION = "1.1.15"; +$VERSION = "1.1.16"; 1; EOF 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; } } |