line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::AutoLink::Plugin; |
2
|
3
|
|
|
3
|
|
19
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
151
|
|
3
|
3
|
|
|
3
|
|
19
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
765
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub new |
6
|
|
|
|
|
|
|
{ |
7
|
18
|
|
|
18
|
1
|
59
|
my $class = shift; |
8
|
18
|
|
|
|
|
37
|
my %args = @_; |
9
|
18
|
|
100
|
|
|
144
|
my $self = bless { |
10
|
|
|
|
|
|
|
target => $args{target} || '', |
11
|
|
|
|
|
|
|
}, $class; |
12
|
18
|
|
|
|
|
74
|
return $self; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
0
|
1
|
0
|
sub process { die } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub linkfy |
18
|
|
|
|
|
|
|
{ |
19
|
11
|
|
|
11
|
1
|
16
|
my $self = shift; |
20
|
11
|
|
|
|
|
45
|
my %args = @_; |
21
|
|
|
|
|
|
|
|
22
|
11
|
100
|
50
|
|
|
161
|
my $target = exists $args{target} ? ($args{target} || '') : $self->{target}; |
23
|
11
|
100
|
|
|
|
28
|
if ($target) { |
24
|
2
|
|
|
|
|
6
|
$target = qq| target="$target"|; |
25
|
|
|
|
|
|
|
} |
26
|
11
|
|
33
|
|
|
154
|
return sprintf('%s', |
27
|
|
|
|
|
|
|
$args{href}, $target, $args{text} || $args{href}); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |