MOBY

 view release on metacpan or  search on metacpan

share/cgi/Moby  view on Meta::CPAN

#!/usr/bin/perl -w
#-----------------------------------------------------------------
# Moby
# Author: Edward Kawas <edward.kawas@gmail.com>,
# For copyright and disclaimer see below.
#
# $Id: Moby,v 1.2 2009/04/15 16:54:25 kawas Exp $
#
# NOTES:
# 	1. This script can be used to test whether the various 
#	   registry scripts have been installed in their default
#      locations. The script attempts to read HTTP_HOST from
#	   the web servers' environment. If that fails, it 
#      defaults to localhost:8080 which is probably incorrect, so
#      edit it below.
#
#-----------------------------------------------------------------

use strict;
use CGI qw/:standard/;

my $form = new CGI;
print $form->header('text/html');
print &PRINT_HTML;

sub PRINT_HTML {
my $location = '';

# TODO get this from the mobyconfig file
if ( $ENV{'HTTP_HOST'} ) {

	$location .= $ENV{'HTTP_HOST'};
}
else {

	# Set this to the default hostname
	$location .= 'localhost:8080';
}

my $msg =<<EOF;

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Registry Scripts Test Page</title>
<style type="text/css">
<!--
body {
	background: #ffffcd;
	color: #000000;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12pt;
	font-weight: normal;
	margin-top: 110px;
	margin-right: 1em;
	margin-bottom: 1em;
	margin-left: 1em;
	background-position: left top;
	background-repeat: no-repeat;
}
.indent {
	margin-left: 5em;
}
td.text {
	background: #ffffcd;
	color: #000000;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12pt;
	font-weight: normal;
	margin-top: 110px;
	margin-right: 1em;
	margin-bottom: 1em;
	margin-left: 1em;
}
h1 {
	border: solid;
	text-align:center;
	background-color:yellow;
	color: navy;
}
h2 {
	border: ridge;
	padding: 5px;
	background-color:yellow;
	color: navy;
}
h3 {
	border: none;
	padding: 5px;
	background-color:yellow;
	color: navy;
}
.subtitle {
	border: none;
	padding: 5px;
	background-color:yellow;
	color: navy;
}
a:link {
	color: #0000ff;



( run in 2.222 seconds using v1.01-cache-2.11-cpan-bbe5e583499 )