AutoLink/Plugin/Mailto.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 19 / 19 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« AutoLink/Plugin/HTTP.pm ↑ Summary
1 package Text::AutoLink::Plugin::Mailto;
2 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use base qw(Text::AutoLink::Plugin);
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 sub process
7 14 ▶{
Subroutine process: called CC=1 SCAR=0.0
Pod documented
8 14 my $self = shift;
9 14 my $ref = shift;
10  
11 14 $$ref =~ s/(mailto:[^@]+\@[^\.\s]+(?:\.[^\.\s]+)+)/
12 4 $self->linkfy(target => undef, href => $1)
13 /gex;
14 }
15  
16 3 1;
17  
18 =head1 NAME
19  
20 Text::AutoLink::Plugin::Mailto - AutoLink mailto:
21  
22 =cut
« AutoLink/Plugin/HTTP.pm ↑ Summary