line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::APL::Context; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
14757
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
94
|
|
4
|
3
|
|
|
3
|
|
10
|
use warnings; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
66
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
10
|
use base 'Text::APL::Base'; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
440
|
|
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
13
|
use Digest::MD5 (); |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
729
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub _BUILD { |
11
|
24
|
|
|
24
|
|
24
|
my $self = shift; |
12
|
|
|
|
|
|
|
|
13
|
24
|
|
100
|
|
|
94
|
$self->{vars} ||= {}; |
14
|
24
|
|
100
|
|
|
97
|
$self->{helpers} ||= {}; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub id { |
18
|
26
|
|
|
26
|
0
|
34
|
my $self = shift; |
19
|
|
|
|
|
|
|
|
20
|
26
|
|
|
|
|
27
|
my $id = ''; |
21
|
|
|
|
|
|
|
|
22
|
26
|
|
|
|
|
30
|
$id .= join ':', sort keys %{$self->{vars}}; |
|
26
|
|
|
|
|
89
|
|
23
|
26
|
|
|
|
|
32
|
$id .= ','; |
24
|
26
|
|
|
|
|
22
|
$id .= join ':', sort keys %{$self->{helpers}}; |
|
26
|
|
|
|
|
87
|
|
25
|
|
|
|
|
|
|
|
26
|
26
|
|
|
|
|
149
|
return Digest::MD5::md5_hex($id); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
29
|
100
|
|
29
|
0
|
181
|
sub name { $_[0]->{name} || '' } |
30
|
32
|
|
|
32
|
1
|
268
|
sub vars { $_[0]->{vars} } |
31
|
58
|
|
|
58
|
1
|
725
|
sub helpers { $_[0]->{helpers} } |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub add_helper { |
34
|
41
|
|
|
41
|
0
|
53
|
my $self = shift; |
35
|
|
|
|
|
|
|
|
36
|
41
|
|
|
|
|
69
|
$self->add('helpers', @_); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub add_var { |
40
|
1
|
|
|
1
|
0
|
15
|
my $self = shift; |
41
|
|
|
|
|
|
|
|
42
|
1
|
|
|
|
|
5
|
$self->add('vars', @_); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub add { |
46
|
42
|
|
|
42
|
0
|
39
|
my $self = shift; |
47
|
42
|
|
|
|
|
44
|
my ($type, $key, $value) = @_; |
48
|
|
|
|
|
|
|
|
49
|
42
|
|
|
|
|
108
|
$self->{$type}->{$key} = $value; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
__END__ |