line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DTL::Fast::Tag::Firstofdefined; |
2
|
2
|
|
|
2
|
|
1295
|
use strict; use utf8; use warnings FATAL => 'all'; |
|
2
|
|
|
2
|
|
5
|
|
|
2
|
|
|
2
|
|
47
|
|
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
107
|
|
|
2
|
|
|
|
|
48
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
77
|
|
3
|
2
|
|
|
2
|
|
10
|
use parent 'DTL::Fast::Tag::Firstof'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
12
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
$DTL::Fast::TAG_HANDLERS{'firstofdefined'} = __PACKAGE__; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# conditional rendering |
8
|
|
|
|
|
|
|
sub render |
9
|
|
|
|
|
|
|
{ |
10
|
12
|
|
|
12
|
0
|
20
|
my( $self, $context, $global_safe) = @_; |
11
|
12
|
|
|
|
|
20
|
my $result = ''; |
12
|
|
|
|
|
|
|
|
13
|
12
|
|
|
|
|
13
|
foreach my $source (@{$self->{'sources'}}) |
|
12
|
|
|
|
|
26
|
|
14
|
|
|
|
|
|
|
{ |
15
|
27
|
100
|
|
|
|
86
|
if( defined ($result = $source->render($context, $global_safe))) |
16
|
|
|
|
|
|
|
{ |
17
|
12
|
|
|
|
|
22
|
last; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
} |
20
|
12
|
|
|
|
|
64
|
return $result; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |