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