#!/usr/bin/perl
############################################################################################
# Change the first line of this file if the path to your perl is not /usr/bin/perl
# Example: #!/usr/local/bin/perl
############################################################################################
# Standard cgi script wrapper for this web application.
# Author: Daniel Dinev; All rights reserved (c) 2001; http://www.chatologica.com/
############################################################################################

use strict;                                             # make Perl more strict to code
$^W = 1;                                                # enable warnings
$| = 1;                                                 # do not buffer the script output
BEGIN {
    # Now making the current working directory to be the directory where this script resides.
    # This is needed usually if the web server is IIS on Windows platform!
    my $path = $0;                                      # $0 is the full path to this script
    if($path =~ m{^(.*)[/\\][^/\\]+$}) {                # remove script filename from the path
        $path = $1;
        chdir($path) ||
        print "Content-type: text/html\n\nCan't navigate to '$path' directory: $!";
    };
};
use lib qw(.);
use MTS4::STD::MyCarp;                                  # make error messages appear on browser window
use MTS4::STD::CGI_Request;
my $r = new MTS4::STD::CGI_Request;
$r->process;                                            # process this cgi request