line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Graph::Template::Base; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
BEGIN { |
6
|
1
|
|
|
1
|
|
10
|
use vars qw ($VERSION); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
60
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
16
|
$VERSION = 0.01; |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
620
|
use Graph::Template::Factory; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
277
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new |
14
|
|
|
|
|
|
|
{ |
15
|
1
|
|
|
1
|
0
|
17
|
my $class = shift; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
|
|
7
|
push @_, %{shift @_} while UNIVERSAL::isa($_[0], 'HASH'); |
|
0
|
|
|
|
|
0
|
|
18
|
1
|
50
|
|
|
|
6
|
(@_ % 2) |
19
|
|
|
|
|
|
|
and die "$class->new() called with odd number of option parameters\n"; |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
|
|
3
|
my %x = @_; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# Do not use a hashref-slice here because of the uppercase'ing |
24
|
1
|
|
|
|
|
2
|
my $self = {}; |
25
|
1
|
|
|
|
|
5
|
$self->{uc $_} = $x{$_} for keys %x; |
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
|
|
5
|
bless $self, $class; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
1
|
0
|
95
|
sub isa { Graph::Template::Factory::isa(@_) } |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
0
|
0
|
|
sub calculate { ($_[1])->get(@_[0,2]) } |
33
|
|
|
|
|
|
|
#{ |
34
|
|
|
|
|
|
|
# my $self = shift; |
35
|
|
|
|
|
|
|
# my ($context, $attr) = @_; |
36
|
|
|
|
|
|
|
# |
37
|
|
|
|
|
|
|
# return $context->get($self, $attr); |
38
|
|
|
|
|
|
|
#} |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
0
|
0
|
|
sub enter_scope { ($_[1])->enter_scope($_[0]) } |
41
|
|
|
|
|
|
|
#{ |
42
|
|
|
|
|
|
|
# my $self = shift; |
43
|
|
|
|
|
|
|
# my ($context) = @_; |
44
|
|
|
|
|
|
|
# |
45
|
|
|
|
|
|
|
# return $context->enter_scope($self); |
46
|
|
|
|
|
|
|
#} |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
0
|
0
|
|
sub exit_scope { ($_[1])->exit_scope(@_[0, 2]) } |
49
|
|
|
|
|
|
|
#{ |
50
|
|
|
|
|
|
|
# my $self = shift; |
51
|
|
|
|
|
|
|
# my ($context, $no_delta) = @_; |
52
|
|
|
|
|
|
|
# |
53
|
|
|
|
|
|
|
# return $context->exit_scope($self, $no_delta); |
54
|
|
|
|
|
|
|
#} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub deltas |
57
|
|
|
|
|
|
|
{ |
58
|
|
|
|
|
|
|
# my $self = shift; |
59
|
|
|
|
|
|
|
# my ($context) = @_; |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
0
|
0
|
|
return {}; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub resolve |
65
|
|
|
|
|
|
|
{ |
66
|
|
|
|
|
|
|
# my $self = shift; |
67
|
|
|
|
|
|
|
# my ($context) = @_; |
68
|
|
|
|
|
|
|
|
69
|
0
|
|
|
0
|
0
|
|
''; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub render |
73
|
|
|
|
|
|
|
{ |
74
|
|
|
|
|
|
|
# my $self = shift; |
75
|
|
|
|
|
|
|
# my ($context) = @_; |
76
|
|
|
|
|
|
|
|
77
|
0
|
|
|
0
|
0
|
|
1; |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
1; |
81
|
|
|
|
|
|
|
__END__ |