package CGI::Carp::DebugScreen::TT; use strict; use warnings; use Template; our $VERSION = '0.15'; my $DebugTemplate =<<'EOT'; Debug Screen [%- IF style %] [%- style %] [%- END %]

[% error_at | html %]

[%- IF show_raw_error %]
[% raw_error %]
[%- ELSE %]
[%- error_message %]
[%- END %] [%- BLOCK navi %] [%- END %] [%- INCLUDE navi %]

Stacktraces

[%- IF watchlist.0 %] [%- INCLUDE navi %]

Watch List

[%- END %] [%- IF modules.0 %] [%- INCLUDE navi %]

Included Modules

[%- END %] [%- IF environment.0 %] [%- INCLUDE navi %]

Environmental Variables

[%- FOREACH env = environment %] [%- END %]
[% env.key | html %]
[% env.value | html %]
[%- END %]
EOT my $ErrorTemplate =<<'EOT'; An unexpected error has been detected [%- IF style %] [%- style %] [%- END %]

An unexpected error has been detected

Sorry for inconvenience.

EOT sub _escape { my $str = shift; $str =~ s/&/&/g; $str =~ s/>/>/g; $str =~ s/new( FILTERS => { html => sub { _escape(@_) } } ); my $html; $t->process(\$tmpl, \%options, \$html) or $html = $t->error(); return $html; } 1; __END__ =head1 NAME CGI::Carp::DebugScreen::TT - CGI::Carp::DebugScreen Renderer with Template Toolkit =head1 SYNOPSIS use CGI::Carp::DebugScreen ( engine => 'TT', # CGI::Carp::DebugScreen::TT will be called internally ); =head1 DESCRIPTION One of the ready-made view (renderer) classes for L. =head1 METHOD =head2 as_html will be called internally from L. =head1 SEE ALSO L, L