line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DTL::Fast::Filter::DefaultIfNone; |
2
|
2
|
|
|
2
|
|
761
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
44
|
|
3
|
2
|
|
|
2
|
|
8
|
use utf8; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
12
|
|
4
|
2
|
|
|
2
|
|
43
|
use warnings FATAL => 'all'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
58
|
|
5
|
2
|
|
|
2
|
|
9
|
use parent 'DTL::Fast::Filter::Default'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
10
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
$DTL::Fast::FILTER_HANDLERS{default_if_none} = __PACKAGE__; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#@Override |
10
|
|
|
|
|
|
|
sub filter |
11
|
|
|
|
|
|
|
{ |
12
|
11
|
|
|
11
|
0
|
21
|
my $self = shift; # self |
13
|
11
|
|
|
|
|
14
|
shift; # filter_manager |
14
|
11
|
|
|
|
|
21
|
my $value = shift; |
15
|
11
|
|
|
|
|
18
|
my $context = shift; |
16
|
|
|
|
|
|
|
|
17
|
11
|
|
66
|
|
|
45
|
return $value // $self->{default}->render($context); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |