line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DTL::Fast::Expression::Operator::Unary::Defined; |
2
|
2
|
|
|
2
|
|
1017
|
use strict; use utf8; use warnings FATAL => 'all'; |
|
2
|
|
|
2
|
|
3
|
|
|
2
|
|
|
2
|
|
45
|
|
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
43
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
74
|
|
3
|
2
|
|
|
2
|
|
9
|
use parent 'DTL::Fast::Expression::Operator::Unary'; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
11
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
$DTL::Fast::OPS_HANDLERS{'defined'} = __PACKAGE__; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub render |
8
|
|
|
|
|
|
|
{ |
9
|
10
|
|
|
10
|
0
|
9
|
my( $self, $context) = @_; |
10
|
10
|
|
|
|
|
7
|
my $result = undef; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
10
|
50
|
|
|
|
15
|
if( $self->{'a'}->{'undef'} ) |
14
|
|
|
|
|
|
|
{ |
15
|
0
|
|
|
|
|
0
|
$result = 1; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
else |
18
|
|
|
|
|
|
|
{ |
19
|
10
|
|
|
|
|
21
|
$result = defined $self->{'a'}->render($context, 1); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
10
|
|
|
|
|
27
|
return $result; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |