line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DTL::Fast::Tag::Dump; |
2
|
4
|
|
|
4
|
|
1797
|
use strict; use utf8; use warnings FATAL => 'all'; |
|
4
|
|
|
4
|
|
8
|
|
|
4
|
|
|
4
|
|
96
|
|
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
81
|
|
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
125
|
|
3
|
4
|
|
|
4
|
|
15
|
use parent 'DTL::Fast::Tag::Simple'; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
20
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
$DTL::Fast::TAG_HANDLERS{'dump'} = __PACKAGE__; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
#@Override |
8
|
|
|
|
|
|
|
sub parse_parameters |
9
|
|
|
|
|
|
|
{ |
10
|
21
|
|
|
21
|
0
|
17
|
my $self = shift; |
11
|
|
|
|
|
|
|
|
12
|
21
|
100
|
|
|
|
48
|
die $self->get_parse_error("no variable specified for dumping") unless $self->{'parameter'}; |
13
|
18
|
|
|
|
|
50
|
$self->{'variables'} = $self->parse_sources($self->{'parameter'}); |
14
|
|
|
|
|
|
|
|
15
|
18
|
|
|
|
|
27
|
return $self; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
#@Override |
19
|
|
|
|
|
|
|
sub render |
20
|
|
|
|
|
|
|
{ |
21
|
18
|
|
|
18
|
0
|
15
|
my ($self, $context) = @_; |
22
|
|
|
|
|
|
|
|
23
|
18
|
|
|
|
|
76
|
require Data::Dumper; |
24
|
18
|
|
|
|
|
23
|
my @result = (); |
25
|
18
|
|
|
|
|
12
|
foreach my $variable (@{$self->{'variables'}}) |
|
18
|
|
|
|
|
23
|
|
26
|
|
|
|
|
|
|
{ |
27
|
|
|
|
|
|
|
push @result, |
28
|
|
|
|
|
|
|
Data::Dumper->Dump( |
29
|
|
|
|
|
|
|
[$variable->render($context, 'safe')], |
30
|
21
|
|
|
|
|
154
|
['context.'.$variable->{'original'}] |
31
|
|
|
|
|
|
|
) |
32
|
|
|
|
|
|
|
; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
18
|
|
|
|
|
834
|
return join "\n", @result; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |