File Coverage

blib/lib/Text/AutoLink/Plugin/HTTP.pm
Criterion Covered Total %
statement 13 13 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 18 18 100.0


line stmt bran cond sub pod time code
1             package Text::AutoLink::Plugin::HTTP;
2 3     3   5389 use strict;
  3         6  
  3         105  
3 3     3   35 use warnings;
  3         5  
  3         88  
4 3     3   16 use base qw(Text::AutoLink::Plugin);
  3         14  
  3         935  
5              
6             sub process
7             {
8 14     14 1 21 my $self = shift;
9 14         17 my $ref = shift;
10              
11 14         84 $$ref =~ s/(https?:\/\/[A-Za-z0-9~\/._!\?\&=\-%#\+:\;,\@\']+)/
12 6         36 $self->linkfy(href => $1)
13             /gex;
14             }
15              
16             1;
17              
18             =head1 NAME
19              
20             Text::AutoLink::Plugin::HTTP - AutoLink HTTP
21              
22             =cut