Wed Jun 9 07:35:19 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
[MPC.git] / mwc.pl
blobf2d9187e4931b7744188dd0ad800d4f3e7076dea
1 #! /usr/bin/perl
2 eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}'
3 & eval 'exec perl -w -S $0 $argv:q'
4 if 0;
6 # ******************************************************************
7 # Author: Chad Elliott
8 # Date: 6/17/2002
9 # $Id$
10 # ******************************************************************
12 # ******************************************************************
13 # Pragma Section
14 # ******************************************************************
16 require 5.006;
18 use strict;
19 use FindBin;
20 use File::Spec;
21 use File::Basename;
23 ## Sometimes $FindBin::RealBin will end up undefined. If it is, we need
24 ## to use the directory of the built-in script name. And, for VMS, we
25 ## have to convert that into a UNIX path so that Perl can use it
26 ## internally.
27 my $basePath = (defined $FindBin::RealBin && $FindBin::RealBin ne '' ?
28 $FindBin::RealBin : File::Spec->rel2abs(dirname($0)));
29 $basePath = VMS::Filespec::unixify($basePath) if ($^O eq 'VMS');
30 unshift(@INC, $basePath . '/modules');
32 require Driver;
34 # ************************************************************
35 # Subroutine Section
36 # ************************************************************
38 sub getBasePath {
39 return $basePath;
42 # ************************************************************
43 # Main Section
44 # ************************************************************
46 my $driver = new Driver($basePath, Driver::workspaces());
47 exit($driver->run(@ARGV));