line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::AutoLink::Plugin::CPAN; |
2
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
84
|
|
3
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
72
|
|
4
|
2
|
|
|
2
|
|
12
|
use base qw(Text::AutoLink::Plugin); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
1283
|
|
5
|
2
|
|
|
2
|
|
2311
|
use URI; |
|
2
|
|
|
|
|
11076
|
|
|
2
|
|
|
|
|
319
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub process |
8
|
|
|
|
|
|
|
{ |
9
|
9
|
|
|
9
|
1
|
14
|
my $self = shift; |
10
|
9
|
|
|
|
|
12
|
my $ref = shift; |
11
|
|
|
|
|
|
|
|
12
|
9
|
|
|
|
|
106
|
$$ref =~ s{cpan://([A-Za-z0-9:_-]+)}{ |
13
|
0
|
|
|
|
|
|
my $uri = URI->new('http://search.cpan.org/search'); |
14
|
0
|
|
|
|
|
|
$uri->query_form(query => $1); |
15
|
0
|
|
|
|
|
|
$self->linkfy(href => $uri->as_string, text => $1); |
16
|
|
|
|
|
|
|
}gex; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
1; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
__END__ |