line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Graphviz::DSL::Component; |
2
|
8
|
|
|
8
|
|
4620
|
use strict; |
|
8
|
|
|
|
|
13
|
|
|
8
|
|
|
|
|
253
|
|
3
|
8
|
|
|
8
|
|
122
|
use warnings; |
|
8
|
|
|
|
|
13
|
|
|
8
|
|
|
|
|
1679
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub update_attributes { |
6
|
6
|
|
|
6
|
0
|
24
|
my ($self, $attrs) = @_; |
7
|
|
|
|
|
|
|
|
8
|
6
|
|
|
|
|
13
|
OUTER: |
9
|
6
|
|
|
|
|
9
|
for my $attr (@{$attrs}) { |
10
|
7
|
|
|
|
|
9
|
my ($key, $val) = @{$attr}; |
|
7
|
|
|
|
|
15
|
|
11
|
7
|
|
|
|
|
10
|
for my $old_attr (@{$self->{attributes}}) { |
|
7
|
|
|
|
|
17
|
|
12
|
3
|
|
|
|
|
4
|
my ($old_key, $old_val) = @{$old_attr}; |
|
3
|
|
|
|
|
7
|
|
13
|
|
|
|
|
|
|
|
14
|
3
|
100
|
|
|
|
11
|
if ($key eq $old_key) { |
15
|
1
|
|
|
|
|
3
|
$old_attr->[1] = $val; |
16
|
1
|
|
|
|
|
4
|
next OUTER; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
6
|
|
|
|
|
9
|
push @{$self->{attributes}}, $attr; |
|
6
|
|
|
|
|
43
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub as_string { |
25
|
0
|
|
|
0
|
0
|
0
|
die "'as_string' method should be overwritten by subclass"; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# accessor |
29
|
64
|
|
|
64
|
0
|
7536
|
sub attributes { $_[0]->{attributes}; } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |