package Egg::Util::DebugScreen; # # Masatoshi Mizuno ElusheE<64>cpan.orgE # # $Id: DebugScreen.pm 342 2008-05-29 16:05:06Z lushe $ # use strict; use warnings; use Egg::Release; use HTML::Entities; our $VERSION = '3.04'; sub _debug_screen { my($e)= @_; $e->setup_error_header; $e->finished(0); $e->response->body( _content($e) ); $e->_output; } sub _content { my($e)= @_; my $err= $e->errstr || 'Internal Error.'; my($res, $querys, $escape)= ($e->response, '', q{'"&<>@}); $err= encode_entities($err, $escape); $err=~s{\n} [
\n]sg; my $param; if ($param= $e->request->params and %$param) { $querys = q{
Request Querys:}; while (my($key, $value)= each %$param) { $querys.= q{}; $value = encode_entities($value, $escape) unless ref($value); $querys.= qq{\n}; } $querys.= q{
}. encode_entities($key, $escape). qq{${value}
}; } < EGG - Error.

$e->{namespace} v@{[ $e->VERSION ]}

$err$querys
END_OF_DISP } sub _style { < when debug mode is effective. To use other classes, it sets it to environment variable EGG_DEBUG_SCREEN_CLASS. This module initializes the response status when the exception is generated and displays the screen. In a word, please note that Egg continues processing assuming that '200 OK' was specified when the response status is undefined. =head1 SEE ALSO L, L, =head1 AUTHOR Masatoshi Mizuno ElusheE<64>cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright (C) 2008 Bee Flag, Corp. ELE. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available. =cut