line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DTL::Fast::Tag::Sprintf; |
2
|
2
|
|
|
2
|
|
1188
|
use strict; use utf8; use warnings FATAL => 'all'; |
|
2
|
|
|
2
|
|
4
|
|
|
2
|
|
|
2
|
|
47
|
|
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
171
|
|
|
2
|
|
|
|
|
52
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
73
|
|
3
|
2
|
|
|
2
|
|
10
|
use parent 'DTL::Fast::Tag::Simple'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
11
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
$DTL::Fast::TAG_HANDLERS{'sprintf'} = __PACKAGE__; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
#@Override |
8
|
|
|
|
|
|
|
sub parse_parameters |
9
|
|
|
|
|
|
|
{ |
10
|
3
|
|
|
3
|
0
|
3
|
my $self = shift; |
11
|
3
|
|
|
|
|
18
|
$self->{'parameters'} = $self->parse_sources($self->{'parameter'}); |
12
|
3
|
|
|
|
|
11
|
return $self; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
#@Override |
16
|
|
|
|
|
|
|
sub render |
17
|
|
|
|
|
|
|
{ |
18
|
3
|
|
|
3
|
0
|
6
|
my( $self, $context, $global_safe) = @_; |
19
|
3
|
|
|
|
|
5
|
my $result = ''; |
20
|
|
|
|
|
|
|
|
21
|
3
|
|
|
|
|
5
|
my @parameters = (); |
22
|
|
|
|
|
|
|
|
23
|
3
|
|
|
|
|
4
|
foreach my $parameter (@{$self->{'parameters'}}) |
|
3
|
|
|
|
|
6
|
|
24
|
|
|
|
|
|
|
{ |
25
|
9
|
|
50
|
|
|
25
|
push @parameters, $parameter->render($context) // ''; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
3
|
|
|
|
|
45
|
return sprintf shift @parameters, @parameters; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |