Apache2-ASP
view release on metacpan or search on metacpan
lib/Apache2/ASP/ErrorHandler.pm view on Meta::CPAN
sub run
{
my ($s, $context) = @_;
my $error = $Stash->{error};
my $msg = <<"ERROR";
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head><title>500 Server Error</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
HTML,BODY {
background-color: #FFFFFF;
}
HTML,BODY,P,DIV {
font-family: Arial, Helvetica, Sans-Serif;
}
HTML,BODY,P,PRE,DIV {
font-size: 12px;
}
sbin/asphelper view on Meta::CPAN
# And *Don't* forget about this line:
Include @{[ cwd() ]}/@{[ $args->{domain} ]}/conf/httpd.conf
";
open my $asp_ofh, '>', "$args->{domain}/htdocs/index.asp";
print $asp_ofh <<'ASP';
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Apache2::ASP Test Page</title>
</head>
<body>
<h1>Congratulations</h1>
<p>You have successfully installed Apache2::ASP.</p>
<p>
Visit your <a href="/examples/contact.asp">example contact form</a> to see
several concepts in action.
</p>
</body>
sbin/asphelper view on Meta::CPAN
}# end if()
my \$errors = \$Session->{validation_errors} || { };
my \$err = sub {
my \$name = shift;
return unless \$errors->{\$name};
%><span class="field_error"><%= \$Server->HTMLEncode( \$errors->{\$name} ) %></span><%
};
%>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Apache2::ASP Example Contact Form</title>
<style type="text/css">
.field_error {
color: #FF0000;
font-weight: bold;
}
.label {
display: block;
float: left;
( run in 0.314 second using v1.01-cache-2.11-cpan-4d50c553e7e )