#!/usr/local/bin/perl
#
#   Test for cgi and formlib.pl
#
#   Author: Brigitte Jellinek
#   e-mail: bjelli@cosy.sbg.ac.at
#   URL:    http://www.cosy.sbg.ac.at/people/bjelli.html
# 
#   Version: 0.0  -  Wed Dec 29  1993
#           
############################################################################

sub debug_fields{

    print "<PRE>    ========= FORM Arguments: =========================\n";
    foreach (keys %in)
        {
        print "    $_ = $in{$_}\n";
        }
    print "    ===================================================\n";

}

sub debug{

    print "<PRE>    ========= FORM Arguments: =========================\n";
    foreach (keys %in)
        {
        print "    $_ = $in{$_}\n";
        }
    print "    ===================================================\n";


$ac = $#ARGV;
$av = join('+', @ARGV);



print <<"EOM";

    
    =============== ENVIRONMENT VARIABLES =====================
    argc is $ac
    argv is '$av'

    SERVER_SOFTWARE   = $ENV{SERVER_SOFTWARE}
    SERVER_NAME       = $ENV{SERVER_NAME}
    GATEWAY_INTERFACE = $ENV{GATEWAY_INTERFACE}
    SERVER_PROTOCOL   = $ENV{SERVER_PROTOCOL}
    SERVER_PORT       = $ENV{SERVER_PORT}
    REQUEST_METHOD    = $ENV{REQUEST_METHOD}
    HTTP_ACCEPT       = $ENV{HTTP_ACCEPT}
    PATH_INFO         = $ENV{PATH_INFO}
    PATH_TRANSLATED   = $ENV{PATH_TRANSLATED}
    SCRIPT_NAME       = $ENV{SCRIPT_NAME}
    QUERY_STRING      = $ENV{QUERY_STRING}
    REMOTE_HOST       = $ENV{REMOTE_HOST}
    REMOTE_ADDR       = $ENV{REMOTE_ADDR}
    REMOTE_USER       = $ENV{REMOTE_USER}
    AUTH_TYPE         = $ENV{AUTH_TYPE}
    CONTENT_TYPE      = $ENV{CONTENT_TYPE}
    CONTENT_LENGTH    = $ENV{CONTENT_LENGTH}
    ===========================================================
</PRE>
EOM
} # end sub debug

1;
# That's all folks                                            share and enjoy !
###############################################################################
