#!/usr/bin/perl

use strict;
use XML::EP ();
use XML::EP::Request::CGI ();

my $ep = XML::EP->new();
my $request = XML::EP::Request::CGI->new(@ARGV);
$ep->Handle($request);


if ($@) {
    print("content-type: text/html\n\n",
	  "<html><head><title>Internal error</title></head>\n",
	  "<body bgcolor=\"#ffffff\"><h1>Internal error</h1>\n",
	  "<p>An internal error occurred and a Perl exception was thrown.\n",
	  "The error message is:</p><pre>\n",
	  $@, "\n</pre></body></html>\n");
}


exit 0;
