#!/usr/bin/perl -wT use strict; $|++; use constant ERROR_BADCONFIG => { Type => "Configuration", Description => "This script requires the module listed " . "in the following details; please make " . "sure the module is properly installed.", Fatal => 1 }; eval( "use CGI ':standard'" ); printError( $@,ERROR_BADCONFIG ) if $@; eval( "use MIME::Lite;" ); printError( $@, ERROR_BADCONFIG ) if $@; use CGI; my $cgi = CGI->new(); print $cgi->header; print $cgi->start_html( "Results" ); print "Configuration OK"; print $cgi->end_html; exit 1; sub printError { my $errortext = shift; my ( %errorhash ) = @_; print "$errorhash{ 'Type' } Error Detected\n", "$errorhash{ 'Description' }\n", "Error Details: $errortext\n"; if ( $errorhash{ "Fatal" } ) { die "Fatal Error Detected" }; }