summaryrefslogtreecommitdiff
path: root/mwc.pl
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2004-05-18 14:39:41 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2004-05-18 14:39:41 +0000
commitf562e697f50add73fd6157b169bc9bac02aff1a1 (patch)
tree4c6083c657aa16357449be9d958ceba684ee1ef4 /mwc.pl
parentab62dcd73f740c95da4d6480a51b4016f47414d4 (diff)
downloadMPC-f562e697f50add73fd6157b169bc9bac02aff1a1.tar.gz
ChangeLogTag: Tue May 18 09:37:29 2004 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'mwc.pl')
-rwxr-xr-xmwc.pl14
1 files changed, 10 insertions, 4 deletions
diff --git a/mwc.pl b/mwc.pl
index 73d08e40..a4905d2d 100755
--- a/mwc.pl
+++ b/mwc.pl
@@ -14,6 +14,7 @@ eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}'
use strict;
use Cwd;
+use Config;
use File::Basename;
my($basePath) = getExecutePath($0);
@@ -25,13 +26,18 @@ require MWC;
# Subroutine Section
# ************************************************************
+sub getBasePath {
+ return $basePath;
+}
+
+
sub which {
- my($prog) = shift;
- my($exec) = $prog;
- my($part) = '';
- my($envSep) = ($^O eq 'MSWin32' ? ';' : ':');
+ my($prog) = shift;
+ my($exec) = $prog;
if (defined $ENV{'PATH'}) {
+ my($part) = '';
+ my($envSep) = $Config{'path_sep'};
foreach $part (split(/$envSep/, $ENV{'PATH'})) {
$part .= "/$prog";
if ( -x $part ) {