line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Template::Compiled::Expression::Expressions; |
2
|
36
|
|
|
36
|
|
119
|
use strict; |
|
36
|
|
|
|
|
35
|
|
|
36
|
|
|
|
|
787
|
|
3
|
36
|
|
|
36
|
|
391
|
use warnings; |
|
36
|
|
|
|
|
41
|
|
|
36
|
|
|
|
|
1482
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.003'; # VERSION |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package HTML::Template::Compiled::Expression::Defined; |
8
|
36
|
|
|
36
|
|
119
|
use base qw(HTML::Template::Compiled::Expression); |
|
36
|
|
|
|
|
44
|
|
|
36
|
|
|
|
|
4993
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub init { |
11
|
4
|
|
|
4
|
|
8
|
my ($self, $op) = @_; |
12
|
4
|
|
|
|
|
21
|
$self->set_operands([$op]); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
sub to_string { |
15
|
4
|
|
|
4
|
|
8
|
my ($self) = @_; |
16
|
4
|
|
|
|
|
17
|
my ($op) = $self->get_operands; |
17
|
4
|
50
|
|
|
|
45
|
return "defined ( " . (ref $op ? $op->to_string : $op) . " )"; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
package HTML::Template::Compiled::Expression::Literal; |
21
|
36
|
|
|
36
|
|
136
|
use base qw(HTML::Template::Compiled::Expression); |
|
36
|
|
|
|
|
36
|
|
|
36
|
|
|
|
|
4477
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub init { |
24
|
10
|
|
|
10
|
|
17
|
my ($self, $op) = @_; |
25
|
10
|
|
|
|
|
41
|
$self->set_operands([$op]); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub to_string { |
29
|
10
|
|
|
10
|
|
15
|
my ($self) = @_; |
30
|
10
|
|
|
|
|
40
|
my ($op) = $self->get_operands; |
31
|
10
|
|
|
|
|
46
|
return "$op"; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
package HTML::Template::Compiled::Expression::Ternary; |
35
|
36
|
|
|
36
|
|
128
|
use base qw(HTML::Template::Compiled::Expression); |
|
36
|
|
|
|
|
34
|
|
|
36
|
|
|
|
|
4921
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub init { |
38
|
4
|
|
|
4
|
|
14
|
my ($self, @ops) = @_; |
39
|
4
|
|
|
|
|
19
|
$self->set_operands([@ops]); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
sub to_string { |
42
|
4
|
|
|
4
|
|
6
|
my ($self,$level) = @_; |
43
|
4
|
|
|
|
|
23
|
my $indent = $self->level2indent($level); |
44
|
4
|
|
|
|
|
18
|
my ($bool, $true, $false) = $self->get_operands; |
45
|
4
|
50
|
|
|
|
10
|
return $indent . $bool->to_string($level) . ' ? ' . |
|
|
50
|
|
|
|
|
|
46
|
|
|
|
|
|
|
(ref $true ? $true->to_string($level) : $true) |
47
|
|
|
|
|
|
|
. ' : ' . (ref $false ? $false->to_string($level) : $false); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
|