line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DTL::Fast::Tag::Firstof; |
2
|
3
|
|
|
3
|
|
1846
|
use strict; use utf8; use warnings FATAL => 'all'; |
|
3
|
|
|
3
|
|
6
|
|
|
3
|
|
|
3
|
|
73
|
|
|
3
|
|
|
|
|
14
|
|
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
106
|
|
|
3
|
|
|
|
|
72
|
|
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
105
|
|
3
|
3
|
|
|
3
|
|
15
|
use parent 'DTL::Fast::Tag::Simple'; |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
21
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
$DTL::Fast::TAG_HANDLERS{'firstof'} = __PACKAGE__; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
#@Override |
8
|
|
|
|
|
|
|
sub parse_parameters |
9
|
|
|
|
|
|
|
{ |
10
|
23
|
|
|
23
|
0
|
28
|
my $self = shift; |
11
|
23
|
|
|
|
|
82
|
$self->{'sources'} = $self->parse_sources($self->{'parameter'}); |
12
|
23
|
|
|
|
|
50
|
return $self; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
#@Override |
16
|
|
|
|
|
|
|
sub render |
17
|
|
|
|
|
|
|
{ |
18
|
11
|
|
|
11
|
0
|
16
|
my( $self, $context, $global_safe) = @_; |
19
|
11
|
|
|
|
|
16
|
my $result = ''; |
20
|
|
|
|
|
|
|
|
21
|
11
|
|
|
|
|
14
|
foreach my $source (@{$self->{'sources'}}) |
|
11
|
|
|
|
|
29
|
|
22
|
|
|
|
|
|
|
{ |
23
|
58
|
100
|
|
|
|
159
|
if( $result = $source->render($context, $global_safe) ) |
24
|
|
|
|
|
|
|
{ |
25
|
11
|
|
|
|
|
20
|
last; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
11
|
|
|
|
|
57
|
return $result; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |