AutoLink/Plugin/CPAN.pm

filter: Statementstmt 84.2% 16 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 88.0% 22 / 25 CC 1 SCAR 0.2
CC
1
Cov
84%
process
1.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« AutoLink/Plugin.pm ↑ Summary AutoLink/Plugin/FTP.pm »
1 package Text::AutoLink::Plugin::CPAN;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use base qw(Text::AutoLink::Plugin);
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use URI;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 sub process
8 9 ▶{
Subroutine process: called CC=1 SCAR=1.2
Pod documented
9 9 my $self = shift;
10 9 my $ref = shift;
11  
12 9 $$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 2 1;
20  
21 __END__
« AutoLink/Plugin.pm ↑ Summary AutoLink/Plugin/FTP.pm »