line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Plack::Middleware::Debug::TemplateToolkit; |
2
|
|
|
|
|
|
|
# ABSTRACT: Debug panel for Template Toolkit middleware |
3
|
|
|
|
|
|
|
$Plack::Middleware::Debug::TemplateToolkit::VERSION = '0.28'; |
4
|
1
|
|
|
1
|
|
992
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
5
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
40
|
|
6
|
1
|
|
|
1
|
|
27
|
use 5.008_001; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
4
|
use parent 'Plack::Middleware::Debug::Base'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
8
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub run { |
11
|
0
|
|
|
0
|
1
|
|
my ( $self, $env, $panel ) = @_; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
return sub { |
14
|
0
|
|
|
0
|
|
|
my $res = shift; |
15
|
|
|
|
|
|
|
|
16
|
0
|
0
|
|
|
|
|
$panel->nav_subtitle( $env->{'tt.template'} ) |
17
|
|
|
|
|
|
|
if defined $env->{'tt.template'}; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
my $ttvars = ""; |
20
|
0
|
0
|
|
|
|
|
if ( defined $env->{'tt.vars'} ) { |
21
|
0
|
|
|
|
|
|
$ttvars = 'Template variables (tt.vars)' |
22
|
|
|
|
|
|
|
. $self->render_hash( delete $env->{'tt.vars'} ); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
my @ttkeys = grep { $_ =~ /^tt\./ } keys %$env; |
|
0
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
$panel->content( |
28
|
|
|
|
|
|
|
$self->render_list_pairs( |
29
|
0
|
|
|
|
|
|
[ map { $_ => delete $env->{$_} } sort @ttkeys ] |
30
|
|
|
|
|
|
|
) |
31
|
|
|
|
|
|
|
. $ttvars |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
} |
34
|
0
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |