line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::APL::Context; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
64324
|
use strict; |
|
3
|
|
|
|
|
13
|
|
|
3
|
|
|
|
|
83
|
|
4
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
76
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
15
|
use base 'Text::APL::Base'; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
510
|
|
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
20
|
use Digest::MD5 (); |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
940
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub _BUILD { |
11
|
26
|
|
|
26
|
|
65
|
my $self = shift; |
12
|
|
|
|
|
|
|
|
13
|
26
|
|
100
|
|
|
108
|
$self->{vars} ||= {}; |
14
|
26
|
|
100
|
|
|
115
|
$self->{helpers} ||= {}; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub id { |
18
|
28
|
|
|
28
|
0
|
49
|
my $self = shift; |
19
|
|
|
|
|
|
|
|
20
|
28
|
|
|
|
|
40
|
my $id = ''; |
21
|
|
|
|
|
|
|
|
22
|
28
|
|
|
|
|
42
|
$id .= join ':', sort keys %{$self->{vars}}; |
|
28
|
|
|
|
|
109
|
|
23
|
28
|
|
|
|
|
55
|
$id .= ','; |
24
|
28
|
|
|
|
|
41
|
$id .= join ':', sort keys %{$self->{helpers}}; |
|
28
|
|
|
|
|
111
|
|
25
|
|
|
|
|
|
|
|
26
|
28
|
|
|
|
|
155
|
return Digest::MD5::md5_hex($id); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
31
|
100
|
|
31
|
0
|
171
|
sub name { $_[0]->{name} || '' } |
30
|
35
|
|
|
35
|
1
|
299
|
sub vars { $_[0]->{vars} } |
31
|
64
|
|
|
64
|
1
|
882
|
sub helpers { $_[0]->{helpers} } |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub add_helper { |
34
|
45
|
|
|
45
|
0
|
101
|
my $self = shift; |
35
|
|
|
|
|
|
|
|
36
|
45
|
|
|
|
|
87
|
$self->add('helpers', @_); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub add_var { |
40
|
1
|
|
|
1
|
0
|
28
|
my $self = shift; |
41
|
|
|
|
|
|
|
|
42
|
1
|
|
|
|
|
9
|
$self->add('vars', @_); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub add { |
46
|
46
|
|
|
46
|
0
|
58
|
my $self = shift; |
47
|
46
|
|
|
|
|
82
|
my ($type, $key, $value) = @_; |
48
|
|
|
|
|
|
|
|
49
|
46
|
|
|
|
|
117
|
$self->{$type}->{$key} = $value; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
__END__ |