line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Template::Compiled::Expression::Expressions; |
2
|
36
|
|
|
36
|
|
116
|
use strict; |
|
36
|
|
|
|
|
36
|
|
|
36
|
|
|
|
|
785
|
|
3
|
36
|
|
|
36
|
|
316
|
use warnings; |
|
36
|
|
|
|
|
40
|
|
|
36
|
|
|
|
|
1479
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.002_001'; # TRIAL VERSION |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package HTML::Template::Compiled::Expression::Defined; |
8
|
36
|
|
|
36
|
|
107
|
use base qw(HTML::Template::Compiled::Expression); |
|
36
|
|
|
|
|
41
|
|
|
36
|
|
|
|
|
4904
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub init { |
11
|
4
|
|
|
4
|
|
6
|
my ($self, $op) = @_; |
12
|
4
|
|
|
|
|
15
|
$self->set_operands([$op]); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
sub to_string { |
15
|
4
|
|
|
4
|
|
7
|
my ($self) = @_; |
16
|
4
|
|
|
|
|
14
|
my ($op) = $self->get_operands; |
17
|
4
|
50
|
|
|
|
35
|
return "defined ( " . (ref $op ? $op->to_string : $op) . " )"; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
package HTML::Template::Compiled::Expression::Literal; |
21
|
36
|
|
|
36
|
|
137
|
use base qw(HTML::Template::Compiled::Expression); |
|
36
|
|
|
|
|
37
|
|
|
36
|
|
|
|
|
4263
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub init { |
24
|
10
|
|
|
10
|
|
13
|
my ($self, $op) = @_; |
25
|
10
|
|
|
|
|
34
|
$self->set_operands([$op]); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub to_string { |
29
|
10
|
|
|
10
|
|
17
|
my ($self) = @_; |
30
|
10
|
|
|
|
|
31
|
my ($op) = $self->get_operands; |
31
|
10
|
|
|
|
|
40
|
return "$op"; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
package HTML::Template::Compiled::Expression::Ternary; |
35
|
36
|
|
|
36
|
|
137
|
use base qw(HTML::Template::Compiled::Expression); |
|
36
|
|
|
|
|
41
|
|
|
36
|
|
|
|
|
5196
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub init { |
38
|
4
|
|
|
4
|
|
7
|
my ($self, @ops) = @_; |
39
|
4
|
|
|
|
|
15
|
$self->set_operands([@ops]); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
sub to_string { |
42
|
4
|
|
|
4
|
|
5
|
my ($self,$level) = @_; |
43
|
4
|
|
|
|
|
19
|
my $indent = $self->level2indent($level); |
44
|
4
|
|
|
|
|
17
|
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
|
|
|
|
|
|
|
|