line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Template::Compiled::Plugin::DHTML; |
2
|
1
|
|
|
1
|
|
23410
|
use strict; |
|
1
|
|
|
|
|
16
|
|
|
1
|
|
|
|
|
35
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
4
|
|
|
|
|
|
|
our $VERSION = "0.03"; |
5
|
1
|
|
|
1
|
|
421
|
use Data::TreeDumper; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use Data::TreeDumper::Renderer::DHTML; |
7
|
|
|
|
|
|
|
use HTML::Template::Compiled; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
HTML::Template::Compiled->register(__PACKAGE__); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub register { |
12
|
|
|
|
|
|
|
my ($class) = @_; |
13
|
|
|
|
|
|
|
my %plugs = ( |
14
|
|
|
|
|
|
|
escape => { |
15
|
|
|
|
|
|
|
DHTML => \&dumper, |
16
|
|
|
|
|
|
|
}, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
return \%plugs; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub dumper { |
22
|
|
|
|
|
|
|
my ($var) = @_; |
23
|
|
|
|
|
|
|
my $style; |
24
|
|
|
|
|
|
|
my $body = DumpTree($var, 'Data', |
25
|
|
|
|
|
|
|
DISPLAY_ROOT_ADDRESS => 1, |
26
|
|
|
|
|
|
|
DISPLAY_PERL_ADDRESS => 1, |
27
|
|
|
|
|
|
|
DISPLAY_PERL_SIZE => 1, |
28
|
|
|
|
|
|
|
RENDERER => { |
29
|
|
|
|
|
|
|
NAME => 'DHTML', |
30
|
|
|
|
|
|
|
STYLE => \$style, |
31
|
|
|
|
|
|
|
BUTTON => { |
32
|
|
|
|
|
|
|
COLLAPSE_EXPAND => 1, |
33
|
|
|
|
|
|
|
SEARCH => 1, |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
return $style.$body; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
my $version_pod = <<'=cut'; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
HTML::Template::Compiled::Plugin::DHTML - Dumps variables into clickable HTML output |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 VERSION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
$VERSION = "0.03" |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=cut |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub __test_version { |
54
|
|
|
|
|
|
|
my $v = __PACKAGE__->VERSION; |
55
|
|
|
|
|
|
|
my ($v_test) = $version_pod =~ m/VERSION\s*=\s*"(.+)"/m; |
56
|
|
|
|
|
|
|
no warnings; |
57
|
|
|
|
|
|
|
return $v eq $v_test ? 1 : 0; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
__END__ |