Ark
view release on metacpan or search on metacpan
lib/Ark/Context/Debug.pm view on Meta::CPAN
lazy => 1,
default => sub {
my $self = shift;
$self->ensure_class_loaded('Text::MicroTemplate');
Text::MicroTemplate::build_mt(<<'__EOF__');
? sub encoded_string { goto &Text::MicroTemplate::encoded_string }
<?= encoded_string(qq[<\?xml version="1.0" encoding="utf-8"?\>\n]) ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<title>500 Internal Server Error</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
font-family: Verdana, Arial, sans-serif;
font-size: 100%;
}
pre {
padding: 5px;
overflow: auto;
}
code {
font-family: Monaco, 'Courier New', monospace;
}
pre code {
width: 100%;
}
body {
font-size: 76%;
background-color: #ccc;
}
#container {
margin: 0 100px;
padding: 30px;
border-right: 1px solid;
border-left: 1px solid;
background-color: #fefefe;
}
h1 {
color: #f00;
font-size: 2em;
}
h2 {
color: #006088;
margin-top: 20px;
font-size: 1.8em;
}
#error {
padding: 10px;
color: #f00;
font-weight: bold;
border: 1px solid #f00;
background-color: #fee;
}
.dump pre {
border: 1px solid #333;
background-color: #ddd;
width: 100%;
overflow: auto;
padding: 0px;
}
.dump pre code {
display: block;
padding: 10px;
width: auto;
}
#stacktrace pre {
border: none;
padding: 0px;
}
.trace {
border: 1px solid #333;
background-color: #ddd;
padding: 10px;
margin-bottom: 5px;
}
.trace h3 {
margin-bottom: 5px;
}
</style>
</head>
<body>
<div id="container">
<h1>500 Internal Server Error</h1>
<div id="error">
<pre><?= $_[0]->error->[0] ?></pre>
</div>
<div id="stacktrace">
<h2>StackTrace</h2>
? for my $frame (@{ $_[0]->debug_stack_traces }) {
? last if $frame->package =~ /^Ark::/;
<div class="trace">
<h3><?= $frame->package ?> - line:<?= $frame->line ?></h3>
<pre><code><?= encoded_string( $_[0]->debug_print_context( $frame->filename, $frame->line, 3 ) ) ?>
</code></pre>
</div>
? }
</div>
</div>
</body>
</html>
( run in 4.874 seconds using v1.01-cache-2.11-cpan-140bd7fdf52 )