line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package GraphViz::Graph::Edge; |
2
|
|
|
|
|
|
|
#_{ Use |
3
|
9
|
|
|
9
|
|
54
|
use warnings; |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
239
|
|
4
|
9
|
|
|
9
|
|
38
|
use strict; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
173
|
|
5
|
|
|
|
|
|
|
|
6
|
9
|
|
|
9
|
|
36
|
use Carp; |
|
9
|
|
|
|
|
16
|
|
|
9
|
|
|
|
|
351
|
|
7
|
9
|
|
|
9
|
|
41
|
use GraphViz::Graph; |
|
9
|
|
|
|
|
16
|
|
|
9
|
|
|
|
|
2318
|
|
8
|
|
|
|
|
|
|
#_} |
9
|
|
|
|
|
|
|
#_{ Version |
10
|
|
|
|
|
|
|
our $VERSION = $GraphViz::Graph::Version; |
11
|
|
|
|
|
|
|
#_} |
12
|
|
|
|
|
|
|
#_{ Methods |
13
|
|
|
|
|
|
|
#_{ POD |
14
|
|
|
|
|
|
|
=head1 METHODS |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
#_} |
18
|
|
|
|
|
|
|
sub new { #_{ |
19
|
|
|
|
|
|
|
#_{ POD |
20
|
|
|
|
|
|
|
=head2 new |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=cut |
23
|
|
|
|
|
|
|
#_} |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
26
|
0
|
|
|
|
|
|
my $from = shift; |
27
|
0
|
|
|
|
|
|
my $to = shift; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# my $opts = shift; |
30
|
0
|
|
|
|
|
|
my $self = {}; |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
$self->{from} = GraphViz::Graph::node_or_port_to_string_($from); |
33
|
0
|
|
|
|
|
|
$self->{to } = GraphViz::Graph::node_or_port_to_string_($to ); |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
bless $self, $class; |
36
|
0
|
|
|
|
|
|
return $self; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
} #_} |
39
|
|
|
|
|
|
|
sub arrow_end { #_{ |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
#_{ POD |
42
|
|
|
|
|
|
|
=head2 arrow_end |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
$edge_one->arrow_end('normal'); |
45
|
|
|
|
|
|
|
$edge_two->arrow_end('none'); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Sets the shape of the edge's end. L. |
48
|
|
|
|
|
|
|
Technically, it sets the C attribute. But because C is |
49
|
|
|
|
|
|
|
confusing, the method is named C. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
TODO: L |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |
54
|
|
|
|
|
|
|
#_} |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
57
|
0
|
|
|
|
|
|
my $arrow = shift; |
58
|
0
|
|
|
|
|
|
$self->{arrow}->{head}=$arrow; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
} #_} |
61
|
|
|
|
|
|
|
sub arrow_start { #_{ |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
#_{ POD |
64
|
|
|
|
|
|
|
=head2 arrow_start |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
$edge_one->arrow_start('normal'); |
67
|
|
|
|
|
|
|
$edge_two->arrow_start('none' ); |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Sets the shape of the edge's start. L. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |
72
|
|
|
|
|
|
|
#_} |
73
|
|
|
|
|
|
|
|
74
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
75
|
0
|
|
|
|
|
|
my $arrow = shift; |
76
|
0
|
|
|
|
|
|
$self->{arrow}->{tail}=$arrow; |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
} #_} |
79
|
|
|
|
|
|
|
sub dot_text { #_{ |
80
|
|
|
|
|
|
|
#_{ POD |
81
|
|
|
|
|
|
|
=head2 dot_text |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Returns the dot-text that represents the edge on which it was called. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Called by L's C. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=cut |
88
|
|
|
|
|
|
|
#_} |
89
|
|
|
|
|
|
|
|
90
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
91
|
|
|
|
|
|
|
|
92
|
0
|
|
0
|
|
|
|
my $arrow_head = $self->{arrow}->{head} // ''; |
93
|
0
|
|
0
|
|
|
|
my $arrow_tail = $self->{arrow}->{tail} // ''; |
94
|
|
|
|
|
|
|
|
95
|
0
|
|
|
|
|
|
my @attributes; |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
# Apparently, if arrowtail is set, it also needs 'dir=both' |
98
|
0
|
0
|
|
|
|
|
push @attributes, "dir=both" if $arrow_tail ;#or $arrow_tail; |
99
|
0
|
0
|
|
|
|
|
push @attributes, "arrowhead=$arrow_head" if $arrow_head; |
100
|
0
|
0
|
|
|
|
|
push @attributes, "arrowtail=$arrow_tail" if $arrow_tail; |
101
|
|
|
|
|
|
|
|
102
|
0
|
|
|
|
|
|
my $attributes=join ' ', @attributes; |
103
|
0
|
0
|
|
|
|
|
$attributes = " [$attributes]" if $attributes; |
104
|
|
|
|
|
|
|
|
105
|
0
|
|
|
|
|
|
my $ret = "$self->{from} -> $self->{to}$attributes;\n"; |
106
|
|
|
|
|
|
|
|
107
|
0
|
|
|
|
|
|
return $ret; |
108
|
|
|
|
|
|
|
} #_} |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
#_} |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
'tq84'; |