diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2010-03-15 12:54:41 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2010-03-15 12:54:41 +0000 |
commit | 803f4983d456988e2af5ab263b71837a4419fa81 (patch) | |
tree | 35ced31712acac8c5bee2688b49b9a248c2d3916 /mwc.pl | |
parent | a9b495bb4d1c5d04f18b53b1e51eb51ff62d93a2 (diff) | |
download | MPC-803f4983d456988e2af5ab263b71837a4419fa81.tar.gz |
ChangeLogTag: Mon Mar 15 12:53:26 UTC 2010 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'mwc.pl')
-rwxr-xr-x | mwc.pl | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -20,12 +20,13 @@ use FindBin; use File::Spec; use File::Basename; -my $basePath = $FindBin::RealBin; -my $baseName = $FindBin::RealScript; -if ($^O eq 'VMS') { - $basePath = File::Spec->rel2abs(dirname($0)) if ($basePath eq ''); - $basePath = VMS::Filespec::unixify($basePath); -} +## Sometimes $FindBin::RealBin will end up undefined. If it is, we need +## to use the directory of the built-in script name. And, for VMS, we +## have to convert that into a UNIX path so that Perl can use it +## internally. +my $basePath = (defined $FindBin::RealBin && $FindBin::RealBin ne '' ? + $FindBin::RealBin : File::Spec->rel2abs(dirname($0))); +$basePath = VMS::Filespec::unixify($basePath) if ($^O eq 'VMS'); unshift(@INC, $basePath . '/modules'); require Driver; |