line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
3749
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
95
|
|
2
|
2
|
|
|
2
|
|
11
|
use warnings FATAL => 'all'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
104
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package HTML::Tested::Value::Link; |
5
|
2
|
|
|
2
|
|
10
|
use base 'HTML::Tested::Value::Array'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1319
|
|
6
|
2
|
|
|
2
|
|
11
|
use Carp; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
475
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub value_to_string { |
9
|
13
|
|
|
13
|
1
|
36
|
my ($self, $id, $val, $caller) = @_; |
10
|
13
|
|
|
|
|
47
|
my $n = $self->name; |
11
|
13
|
|
|
|
|
43
|
my $l = $caller->ht_get_widget_option($n, "caption"); |
12
|
13
|
100
|
|
|
|
51
|
$l = shift(@$val) unless defined($l); |
13
|
|
|
|
|
|
|
|
14
|
13
|
|
|
|
|
48
|
my $f = $caller->ht_get_widget_option($n, "href_format"); |
15
|
|
|
|
|
|
|
|
16
|
13
|
50
|
33
|
|
|
81
|
confess "Invalid value in $id link" |
17
|
|
|
|
|
|
|
unless ($val && ref($val) eq 'ARRAY'); |
18
|
|
|
|
|
|
|
|
19
|
13
|
100
|
|
|
|
95
|
my $h = $f ? sprintf($f, @$val) : $val->[0]; |
20
|
|
|
|
|
|
|
return <
|
21
|
|
|
|
|
|
|
$l |
22
|
|
|
|
|
|
|
ENDS |
23
|
13
|
|
|
|
|
100
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |