Changeset 24589 for lang/perl/CGI-Carp-DebugScreen/trunk
- Timestamp:
- 11/22/08 03:26:31 (5 years ago)
- Location:
- lang/perl/CGI-Carp-DebugScreen/trunk
- Files:
-
- 1 added
- 8 modified
-
Changes (modified) (1 diff)
-
MANIFEST (modified) (1 diff)
-
README (modified) (2 diffs)
-
lib/CGI/Carp/DebugScreen.pm (modified) (16 diffs)
-
lib/CGI/Carp/DebugScreen/DefaultView.pm (modified) (8 diffs)
-
lib/CGI/Carp/DebugScreen/Dumper.pm (modified) (2 diffs)
-
lib/CGI/Carp/DebugScreen/HTML/Template.pm (modified) (8 diffs)
-
lib/CGI/Carp/DebugScreen/TT.pm (modified) (8 diffs)
-
t/10_view.t (added)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/CGI-Carp-DebugScreen/trunk/Changes
r24376 r24589 1 1 Revision history for CGI::Carp::DebugScreen 2 2 3 0.15 2008/11/ ** (not yet released but will be soon)4 - major cosmetic changes5 - now accepts any rendererwith "as_html" method3 0.15 2008/11/22 4 - major refactoring; internals are changed a lot 5 - now accepts any engine/view with "as_html" method 6 6 - some of the name of the options are changed and 7 7 waiting for deprecation. If you have used a custom 8 renderer, see the sources and find "XXX"s. 8 view, see the sources and find "XXX"s. 9 - added some tests 9 10 10 11 0.14 2007/05/27 -
lang/perl/CGI-Carp-DebugScreen/trunk/MANIFEST
r24376 r24589 9 9 README 10 10 t/00_load.t 11 t/10_view.t 11 12 t/20_dumper.t 12 13 t/99_pod.t -
lang/perl/CGI-Carp-DebugScreen/trunk/README
r24382 r24589 4 4 CGI::Carp::DebugScreen provides decent debug/error screens for Web 5 5 applications via CGI::Carp's set_message() function. You don't need 6 to care $SIG{__DIE__} anymore. Just die or croak to get the right 6 to care $SIG{__DIE__} anymore. Just die or croak to get the right 7 7 thing. You can customize those screens as well. 8 8 … … 22 22 CGI::Carp 23 23 24 COPYRIGHT AND LICEN SE24 COPYRIGHT AND LICENCE 25 25 26 Copyright (C) 2005-200 8by Kenichi Ishigaki26 Copyright (C) 2005-2006 by Kenichi Ishigaki 27 27 28 28 This library is free software; you can redistribute it and/or modify -
lang/perl/CGI-Carp-DebugScreen/trunk/lib/CGI/Carp/DebugScreen.pm
r24382 r24589 11 11 my $MyDebug = 0; 12 12 CGI::Carp::set_message( 13 sub { __PACKAGE__->_ show(@_) }13 sub { __PACKAGE__->_output(@_) } 14 14 ) unless $MyDebug; 15 15 } … … 17 17 $Carp::Verbose = 1; # for stacktraces 18 18 19 my $Debug = 1; 20 my $Engine = 'DefaultView'; 21 my $ShowLines = 3; 22 my $ShowMod; 23 my $ShowEnv; 24 my $ShowRawError; 25 my $IgnoreOverload; 26 my $DebugTemplate; 27 my $ErrorTemplate; 28 my $WatchList = {}; 29 30 my $Style =<<'EOS'; 19 sub _default_stylesheet { 20 return <<'EOS'; 31 21 <style type="text/css"> 32 22 <!-- … … 36 26 color: #000; 37 27 background-color: #f60; 38 margin: 0 ;39 padding: 0 ;28 margin: 0px; 29 padding: 0px; 40 30 } 41 31 :link, :link:hover, :visited, :visited:hover { … … 76 66 font-size: .8em; 77 67 line-height: 120%; 78 font-family: "Courier New", Courier, monospace;68 font-family: 'Courier New', Courier, monospace; 79 69 background-color: #fc9; 80 70 color: #333; … … 95 85 table.code td.num { 96 86 width: 4em; 97 text-align: right;87 text-align:right 98 88 } 99 89 table.watch { … … 124 114 font-size: .8em; 125 115 line-height: 120%; 126 font-family: "Courier New", Courier, monospace;116 font-family: 'Courier New', Courier, monospace; 127 117 overflow: auto; 128 118 } … … 137 127 margin: 0 1em; 138 128 font-size: .8em; 139 text-align: right; 140 } 141 129 text-align:right; 130 } 142 131 --> 143 132 </style> 144 133 EOS 134 } 135 136 my %Options; 137 my %Mapping = ( 138 debug => qr/^d(?:ebug)?$/, 139 engine => qr/^e(?:ngine)?$/, 140 show_lines => qr/^l(?:ines)?$/, 141 show_mod => qr/^m(?:od(?:ules)?)?$/, 142 show_env => qr/^env(?:ironment)?$/, 143 show_raw_error => qr/^raw(?:_error)?$/, 144 ignore_overload => qr/^(?:ignore_)?overload$/, 145 debug_template => qr/^d(?:ebug_)?t(?:emplate)?$/, 146 error_template => qr/^e(?:rror_)?t(?:emplate)?$/, 147 style => qr/^s(?:tyle)?$/, 148 ); 145 149 146 150 sub import { 147 my $pkg = shift; 148 my %options = @_; 151 my ($class, %options) = @_; 152 153 %Options = ( 154 debug => 1, 155 engine => 'DefaultView', 156 show_lines => 3, 157 show_mod => 0, 158 show_env => 0, 159 show_raw_error => 0, 160 ignore_overload => 0, 161 debug_template => '', 162 error_template => '', 163 style => _default_stylesheet(), 164 watchlist => {}, 165 ); 149 166 150 167 while(my ($key, $value) = each %options) { 151 168 next unless defined $value; 152 $key = lc $key; 153 $Debug = $value if $key =~ /^d(?:ebug)?$/; 154 $Engine = $value if $key =~ /^e(?:ngine)?$/; 155 $ShowLines = $value if $key =~ /^l(?:ines)?$/; 156 $ShowMod = $value if $key =~ /^m(?:od(?:ules)?)?$/; 157 $ShowEnv = $value if $key =~ /^env(?:ironment)?$/; 158 $ShowRawError = $value if $key =~ /^raw(?:_error)?$/; 159 $IgnoreOverload = $value if $key =~ /^(?:ignore_)?overload$/; 160 $DebugTemplate = $value if $key =~ /^d(?:ebug_)?t(?:emplate)?$/; 161 $ErrorTemplate = $value if $key =~ /^e(?:rror_)?t(?:emplate)?$/; 162 $Style = $value if $key =~ /^s(?:tyle)?$/; 163 } 164 } 165 166 sub debug { shift; $Debug = shift; } 167 sub set_debug_template { shift; $DebugTemplate = shift; } 168 sub set_error_template { shift; $ErrorTemplate = shift; } 169 sub set_style { shift; $Style = shift; } 170 sub show_modules { shift; $ShowMod = shift; } 171 sub show_environment { shift; $ShowEnv = shift; } 172 sub show_raw_error { shift; $ShowRawError = shift; } 173 sub ignore_overload { shift; $IgnoreOverload = shift; } 169 foreach my $canonkey ( keys %Mapping ) { 170 if ( $key =~ $Mapping{$canonkey} ) { 171 $Options{$canonkey} = $value; 172 last; 173 } 174 } 175 } 176 } 177 178 sub debug { shift; $Options{debug} = shift; } 179 sub set_debug_template { shift; $Options{debug_template} = shift; } 180 sub set_error_template { shift; $Options{error_template} = shift; } 181 sub set_style { shift; $Options{style} = shift; } 182 sub show_modules { shift; $Options{show_mod} = shift; } 183 sub show_environment { shift; $Options{show_env} = shift; } 184 sub show_raw_error { shift; $Options{show_raw_error} = shift; } 185 sub ignore_overload { shift; $Options{ignore_overload} = shift; } 174 186 175 187 sub add_watchlist { 176 my ($ pkg, %hash) = @_;188 my ($class, %hash) = @_; 177 189 foreach my $key (keys %hash) { 178 $ WatchList->{$key} = $hash{$key};179 } 180 } 181 182 sub _ show{183 my ($ pkg, $raw_error) = @_;190 $Options{watchlist}->{$key} = $hash{$key}; 191 } 192 } 193 194 sub _get_stacktraces { 195 my ($class, $raw_error) = @_; 184 196 185 197 my $first_message = ''; 186 198 my $no_more_first; 199 187 200 my @stacktraces = grep { 188 my $caller = $_->{caller} || ''; 189 ( 190 $caller eq '' or # ignore undefined caller; 191 $caller eq $INC{'Carp.pm'} or # ignore Carp; 192 $caller eq $INC{'CGI/Carp.pm'} # ignore CGI::Carp; 193 ) ? 0 : 1; 194 } 195 map { 196 my $line = $_; 197 my ($message, $caller, $line_no) = $line =~ /^(?:\s*)(.*?)(?: called)? at (\S+) line (.+)$/; 198 $first_message .= "$line<br>" if !defined $message && !$no_more_first; 199 $no_more_first = 1 if defined $message; 200 $first_message = $message unless $first_message; 201 $caller ||= ''; 202 $line_no ||= 0; 203 my $context = _get_context($caller, $line_no); 204 +{ 205 message => $message, 206 caller => $caller, 207 line => $line_no, 208 context => $context, 209 210 # XXX: will be deprecated next time 211 contents => $context, 212 } 213 } split(/\n/, $raw_error); 214 215 my $error_at = $stacktraces[$#stacktraces]->{caller}; 216 217 my @modules = (); 218 @modules = map { 201 my $caller = $_->{caller} || ''; 202 ( 203 $caller eq '' or # ignore undefined caller; 204 $caller eq $INC{'Carp.pm'} or # ignore Carp; 205 $caller eq $INC{'CGI/Carp.pm'} # ignore CGI::Carp; 206 ) ? 0 : 1; 207 } 208 map { 209 my $line = $_; 210 my ($message, $caller, $line_no) = $line =~ /^(?:\s*)(.*?)(?: called)? at (\S+) line (.+)$/; 211 $first_message .= "$line<br>" if !defined $message && !$no_more_first; 212 $no_more_first = 1 if defined $message; 213 $first_message = $message unless $first_message; 214 $caller ||= ''; 215 $line_no ||= 0; 216 my $context = $class->_get_context($caller, $line_no); 217 +{ 218 message => $message, 219 caller => $caller, 220 line => $line_no, 221 context => $context, 222 223 # XXX: will be deprecated next time 224 contents => $context, 225 }; 226 } split(/\n/, $raw_error); 227 228 my $error_at = $stacktraces[$#stacktraces]->{caller}; 229 my $error_message = $first_message.' at '.$stacktraces[0]->{caller}.' line '.$stacktraces[0]->{line}; 230 231 return ( $error_at, $error_message, @stacktraces ); 232 } 233 234 sub _get_context { 235 my ($class, $file, $line_no) = @_; 236 237 return unless $file && -f $file; 238 239 my @context; 240 if (open my $fh, '<', $file) { 241 my $ct = 0; 242 while(my $line = <$fh>) { 243 $ct++; 244 next if $ct < $line_no - $Options{show_lines}; 245 last if $ct > $line_no + $Options{show_lines}; 246 push @context, { 247 no => $ct, 248 line => $line, 249 hit => ($ct == $line_no), 250 }; 251 } 252 } 253 \@context; 254 } 255 256 sub _get_modules { 257 my ($class, $flag) = @_; 258 259 return unless $flag; 260 261 return map { 219 262 my $key = $_; 220 263 (my $package = $key) =~ s|/|::|g; … … 223 266 file => $INC{$key}, 224 267 } 225 } sort {$a cmp $b} keys %INC if $ShowMod; 226 227 my @environment = (); 228 @environment = map { 268 } sort {$a cmp $b} keys %INC; 269 } 270 271 sub _get_env { 272 my ($class, $flag) = @_; 273 274 return unless $flag; 275 276 return map { 229 277 +{ 230 278 key => $_, 231 279 value => $ENV{$_}, 232 280 } 233 } sort {$a cmp $b} keys %ENV if $ShowEnv; 234 235 my @watchlist = (); 236 if (%{ $WatchList }) { 281 } sort {$a cmp $b} keys %ENV; 282 } 283 284 sub _get_watchlist { 285 my ($class, $href, $overload) = @_; 286 287 my @list; 288 if (%{ $href }) { 237 289 require CGI::Carp::DebugScreen::Dumper; 238 CGI::Carp::DebugScreen::Dumper->ignore_overload($IgnoreOverload); 239 foreach my $key (sort {$a cmp $b} keys %{ $WatchList }) { 240 my $dump = CGI::Carp::DebugScreen::Dumper->dump( 241 $WatchList->{$key} 242 ); 243 push @watchlist, { 290 CGI::Carp::DebugScreen::Dumper->ignore_overload($overload); 291 foreach my $key (sort {$a cmp $b} keys %{ $href }) { 292 my $dump = CGI::Carp::DebugScreen::Dumper->dump($href->{$key}); 293 push @list, { 244 294 key => $key, 245 295 value => $dump, … … 250 300 } 251 301 } 252 253 my ($renderer_class, $renderer); 254 if ( ref $Engine && $Engine->can('as_html') ) { 255 $renderer_class = ref $Engine; 256 $renderer = $Engine; 302 return @list; 303 } 304 305 sub _load_view { 306 my ($class, $engine) = @_; 307 308 my ($view_class, $view); 309 if ( ref $engine && $engine->can('as_html') ) { 310 $view_class = ref $engine; 311 $view = $engine; 257 312 } 258 313 else { 259 $Engine = 'TT' if lc $Engine eq 'template';# engine alias260 261 $renderer_class = 262 ( $Engine =~ s/^\+// ) ? $Engine : __PACKAGE__.'::'.$Engine;263 264 eval "require $ renderer_class";314 # engine alias 315 $engine = 'TT' if lc $engine eq 'template'; 316 317 $view_class = ( $engine =~ s/^\+// ) ? $engine : __PACKAGE__.'::'.$engine; 318 319 eval "require $view_class"; 265 320 if ($@) { 266 321 require CGI::Carp::DebugScreen::DefaultView; 267 $renderer_class = 'CGI::Carp::DebugScreen::DefaultView'; 268 } 269 $renderer = $renderer_class; 270 } 271 272 my $error_message = $first_message.' at '.$stacktraces[0]->{caller}.' line '.$stacktraces[0]->{line}; 273 274 my $html = $renderer->as_html( 322 $view_class = 'CGI::Carp::DebugScreen::DefaultView'; 323 } 324 $view = $view_class; 325 } 326 return ( $view_class, $view ); 327 } 328 329 sub _render { 330 my ($class, $raw_error) = @_; 331 332 my ($error_at, $error_message, @stacktraces) = $class->_get_stacktraces($raw_error); 333 334 my @modules = $class->_get_modules($Options{show_mod}); 335 my @environment = $class->_get_env($Options{show_env}); 336 my @watchlist = $class->_get_watchlist( 337 $Options{watchlist}, 338 $Options{ignore_overload}, 339 ); 340 341 my ($view_class, $view) = $class->_load_view($Options{engine}); 342 343 return $view->as_html( 275 344 version => $VERSION, 276 debug => $ Debug,277 debug_template => $ DebugTemplate,278 error_template => $ ErrorTemplate,279 renderer_class => $renderer_class,280 style => $ Style,345 debug => $Options{debug}, 346 debug_template => $Options{debug_template}, 347 error_template => $Options{error_template}, 348 view => $view_class, 349 style => $Options{style}, 281 350 error_at => $error_at, 282 351 error_message => $error_message, 283 352 raw_error => $raw_error, 284 show_raw_error => $ ShowRawError,353 show_raw_error => $Options{show_raw_error}, 285 354 stacktraces => \@stacktraces, 286 355 modules => \@modules, … … 289 358 290 359 # XXX: will be deprecated next time 291 view => $renderer_class, 292 debug_tmpl => $DebugTemplate, 293 error_tmpl => $ErrorTemplate, 360 debug_tmpl => $Options{debug_template}, 361 error_tmpl => $Options{error_template}, 294 362 traces => \@stacktraces, 295 363 ); 364 } 365 366 sub _output { 367 my ($class, $raw_error) = @_; 368 369 my $html = $class->_render($raw_error); 296 370 297 371 # shamelessly stolen from CGI::Carp … … 329 403 } 330 404 331 sub _get_context {332 my ($file, $line_no) = @_;333 334 return unless $file && -f $file;335 336 my @context;337 if (open my $fh, '<', $file) {338 my $ct = 0;339 while(my $line = <$fh>) {340 $ct++;341 next if $ct < $line_no - $ShowLines;342 last if $ct > $line_no + $ShowLines;343 push @context, {344 no => $ct,345 line => $line,346 hit => ($ct == $line_no),347 };348 }349 }350 \@context;351 }352 353 405 1; 354 406 … … 361 413 =head1 SYNOPSIS 362 414 415 use strict; 416 use warnings; 363 417 use Carp; 364 use CGI::Carp::DebugScreen ( 365 debug => $ENV{Debug}, 366 engine => 'HTML::Template', 367 lines => 5, 368 modules => 1, 369 environment => 1, 370 overload => 1, 371 raw_error => 0, 372 ); 418 use CGI::Carp::DebugScreen ( debug => $ENV{Debug} ); 419 use CGI; 420 421 my $query = CGI->new; 373 422 374 423 croak "let's see"; … … 376 425 =head1 DESCRIPTION 377 426 378 C GI::Carp qw/fatalsToBrowser/ is very useful for debugging. But the error screen it provides is a bit too plain; something you don't want to see, and you don't want your boss and colleagues and users to see. You might know CGI::Carp has a wonderful set_message()function but, you don't want to repeat yourself, right?427 C<CGI::Carp qw/fatalsToBrowser/> is very useful for debugging. But the error screen it provides is a bit too plain; something you don't want to see, and you don't want your boss and colleagues and users to see. You might know CGI::Carp has a wonderful C<set_message()> function but, you don't want to repeat yourself, right? 379 428 380 429 Hence this module. 381 430 382 This module calls C GI::Carp qw/fatalsToBrowser/ and set_message()function internally. If something dies or croaks, this confesses stack traces, included modules (optional), environmental variables (optional, too) in a more decent way.431 This module calls C<CGI::Carp qw/fatalsToBrowser/> and C<set_message()> function internally. If something dies or croaks, this confesses stack traces, included modules (optional), environmental variables (optional, too) in a more decent way. 383 432 384 433 When you finish debugging, set debug option to false (via some environmental variable, for example). Then, more limited, less informative error screen appears when dies or croaks. If something goes wrong and your users might see the screen, they only know something has happened. They'll never know where your modules are and they'll never see the awkward 500 Internal Server Error -- hopefully. … … 411 460 =head2 engine (or e) 412 461 413 Sets the name of a renderingclass. Default value is C<DefaultView>, which uses no template engines. C<HTML::Template> and C<TT> are also available. As of 0.15, you can pass any class with a prepending C<+> or any object with C<as_html> method, which should take a hash of options and returns an HTML string. Your rendering class/object doesn't need to use all of the options naturally.462 Sets the base name of a view class. Default value is C<DefaultView>, which uses no template engines. C<HTML::Template> and C<TT> are also available. As of 0.15, you can pass any class with a prepending C<+> or any object with C<as_html> method, which should take a hash of options and returns an HTML string. Your rendering class/object doesn't need to use all of the options naturally. 414 463 415 464 The options are: … … 429 478 the ones you specified while loading (or via methods). 430 479 431 =item renderer_class432 433 the actual class name of the renderer.480 =item view_class 481 482 the actual class name of the view (i.e. renderer). 434 483 435 484 =item error_at, error_message … … 553 602 =head1 COPYRIGHT AND LICENSE 554 603 555 Copyright (C) 2005-200 8by Kenichi Ishigaki556 557 This library is free software; you can redistribute it and/or 604 Copyright (C) 2005-2006 by Kenichi Ishigaki 605 606 This library is free software; you can redistribute it and/or 558 607 modify it under the same terms as Perl itself. 559 608 -
lang/perl/CGI-Carp-DebugScreen/trunk/lib/CGI/Carp/DebugScreen/DefaultView.pm
r24382 r24589 62 62 63 63 my $html =<<"EOT"; 64 <!DOCTYPE html>65 64 <html> 66 65 <head> … … 91 90 $html .=<<"EOT"; 92 91 <div class="box"> 93 <h2><a name="stacktraces">Stack Traces</a></h2>92 <h2><a name="stacktraces">Stacktraces</a></h2> 94 93 <ul id="stacktraces"> 95 94 EOT … … 145 144 $html .=<<"EOT"; 146 145 <li> 147 < strong>$key</strong><br>146 <b>$key</b><br> 148 147 <div class="scrollable"> 149 148 $table … … 205 204 } 206 205 207 my $version = _escape($options{version});208 my $ renderer = _escape($options{renderer_class});209 210 $html .=<<"EOT"; 211 <p class="footer">CGI::Carp::DebugScreen $version. Output via $ renderer</p>206 my $version = _escape($options{version}); 207 my $view = _escape($options{view}); 208 209 $html .=<<"EOT"; 210 <p class="footer">CGI::Carp::DebugScreen $version. Output via $view</p> 212 211 </div> 213 212 </body> … … 226 225 227 226 my $html =<<"EOT"; 228 <!DOCTYPE html>229 227 <html> 230 228 <head> … … 235 233 <div id="page"> 236 234 <h1>An unexpected error has been detected</h1> 237 <p>Sorry for theinconvenience.</p>235 <p>Sorry for inconvenience.</p> 238 236 </div> 239 237 </body> … … 262 260 =head1 DESCRIPTION 263 261 264 One of the ready-made renderers for L<CGI::Carp::DebugScreen>.262 One of the ready-made view (renderer) classes for L<CGI::Carp::DebugScreen>. 265 263 266 264 Note that this doesn't support template overriding. … … 282 280 =head1 COPYRIGHT AND LICENSE 283 281 284 Copyright (C) 2005-200 8by Kenichi Ishigaki282 Copyright (C) 2005-2006 by Kenichi Ishigaki 285 283 286 284 This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. -
lang/perl/CGI-Carp-DebugScreen/trunk/lib/CGI/Carp/DebugScreen/Dumper.pm
r24382 r24589 134 134 =head1 TODO 135 135 136 I'm afraid that this module should have another (and shorter) name and stand alone. The dumps() method should take array, hash, or multiple variables. 136 I'm afraid that this module should have another (and shorter) name and stand alone. The dumps() method should take array, hash, or multiple variables. 137 137 138 138 =head1 SEE ALSO … … 146 146 =head1 COPYRIGHT AND LICENSE 147 147 148 Copyright (C) 2006 -2008by Kenichi Ishigaki148 Copyright (C) 2006 by Kenichi Ishigaki 149 149 150 150 This library is free software; you can redistribute it and/or modify it -
lang/perl/CGI-Carp-DebugScreen/trunk/lib/CGI/Carp/DebugScreen/HTML/Template.pm
r24382 r24589 8 8 9 9 my $DebugTemplate =<<'EOT'; 10 <!DOCTYPE html>11 10 <html> 12 11 <head> … … 29 28 <div class="navi">[<a href="#top">top</a>] [<a href="#stacktraces">stacktraces</a>]<TMPL_IF NAME="watchlist"> [<a href="#watch">watchlist</a>]</TMPL_IF><TMPL_IF NAME="modules"> [<a href="#modules">modules</a>]</TMPL_IF><TMPL_IF NAME="environment"> [<a href="#environment">environment</a>]</TMPL_IF></div> 30 29 <div class="box"> 31 <h2><a name="stacktraces">Stack Traces</a></h2>30 <h2><a name="stacktraces">Stacktraces</a></h2> 32 31 <ul id="stacktraces"> 33 32 <TMPL_LOOP NAME="stacktraces"> … … 50 49 <TMPL_LOOP NAME="watchlist"> 51 50 <li> 52 < strong><TMPL_VAR NAME="key" ESCAPE=HTML></strong>51 <b><TMPL_VAR NAME="key" ESCAPE=HTML></b> 53 52 <div class="scrollable"> 54 53 <TMPL_VAR NAME="value"> … … 83 82 </div> 84 83 </TMPL_IF> 85 <p class="footer">CGI::Carp::DebugScreen <TMPL_VAR NAME="version" ESCAPE=HTML>. Output via <TMPL_VAR NAME=" renderer_class" ESCAPE=HTML></p>84 <p class="footer">CGI::Carp::DebugScreen <TMPL_VAR NAME="version" ESCAPE=HTML>. Output via <TMPL_VAR NAME="view" ESCAPE=HTML></p> 86 85 </div> 87 86 </body> … … 90 89 91 90 my $ErrorTemplate =<<'EOT'; 92 <!DOCTYPE html>93 91 <html> 94 92 <head> … … 101 99 <div id="page"> 102 100 <h1>An unexpected error has been detected</h1> 103 <p>Sorry for theinconvenience.</p>101 <p>Sorry for inconvenience.</p> 104 102 </div> 105 103 </body> … … 142 140 =head1 DESCRIPTION 143 141 144 One of the ready-made renderers for L<CGI::Carp::DebugScreen>.142 One of the ready-made view (renderer) classes for L<CGI::Carp::DebugScreen>. 145 143 146 144 =head1 METHOD … … 160 158 =head1 COPYRIGHT AND LICENSE 161 159 162 Copyright (C) 2005-200 8by Kenichi Ishigaki160 Copyright (C) 2005-2006 by Kenichi Ishigaki 163 161 164 162 This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. -
lang/perl/CGI-Carp-DebugScreen/trunk/lib/CGI/Carp/DebugScreen/TT.pm
r24382 r24589 8 8 9 9 my $DebugTemplate =<<'EOT'; 10 <!DOCTYPE html>11 10 <html> 12 11 <head> … … 44 43 [%- INCLUDE navi %] 45 44 <div class="box"> 46 <h2><a name="stacktraces">Stack Traces</a></h2>45 <h2><a name="stacktraces">Stacktraces</a></h2> 47 46 <ul id="stacktraces"> 48 47 [%- FOREACH stacktrace = stacktraces %] … … 65 64 [%- FOREACH watch = watchlist %] 66 65 <li> 67 < strong>[% watch.key | html %]</strong>66 <b>[% watch.key | html %]</b> 68 67 <div class="scrollable"> 69 68 [%- watch.value %] … … 98 97 </div> 99 98 [%- END %] 100 <p class="footer">CGI::Carp::DebugScreen [% version %]. Output via [% renderer_class%]</p>99 <p class="footer">CGI::Carp::DebugScreen [% version %]. Output via [% view %]</p> 101 100 </div> 102 101 </body> … … 105 104 106 105 my $ErrorTemplate =<<'EOT'; 107 <!DOCTYPE html>108 106 <html> 109 107 <head> … … 116 114 <div id="page"> 117 115 <h1>An unexpected error has been detected</h1> 118 <p>Sorry for theinconvenience.</p>116 <p>Sorry for inconvenience.</p> 119 117 </div> 120 118 </body> … … 167 165 =head1 DESCRIPTION 168 166 169 One of the ready-made renderers for L<CGI::Carp::DebugScreen>.167 One of the ready-made view (renderer) classes for L<CGI::Carp::DebugScreen>. 170 168 171 169 =head1 METHOD … … 185 183 =head1 COPYRIGHT AND LICENSE 186 184 187 Copyright (C) 2005-200 8by Kenichi Ishigaki185 Copyright (C) 2005-2006 by Kenichi Ishigaki 188 186 189 187 This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)