| blib/lib/Text/AutoLink/Plugin/Mailto.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::Mailto; | ||||||
| 2 | 3 | 3 | 15 | use strict; | |||
| 3 | 6 | ||||||
| 3 | 111 | ||||||
| 3 | 3 | 3 | 16 | use warnings; | |||
| 3 | 7 | ||||||
| 3 | 92 | ||||||
| 4 | 3 | 3 | 16 | use base qw(Text::AutoLink::Plugin); | |||
| 3 | 5 | ||||||
| 3 | 637 | ||||||
| 5 | |||||||
| 6 | sub process | ||||||
| 7 | { | ||||||
| 8 | 14 | 14 | 1 | 19 | my $self = shift; | ||
| 9 | 14 | 19 | my $ref = shift; | ||||
| 10 | |||||||
| 11 | 14 | 101 | $$ref =~ s/(mailto:[^@]+\@[^\.\s]+(?:\.[^\.\s]+)+)/ | ||||
| 12 | 4 | 26 | $self->linkfy(target => undef, href => $1) | ||||
| 13 | /gex; | ||||||
| 14 | } | ||||||
| 15 | |||||||
| 16 | 1; | ||||||
| 17 | |||||||
| 18 | =head1 NAME | ||||||
| 19 | |||||||
| 20 | Text::AutoLink::Plugin::Mailto - AutoLink mailto: | ||||||
| 21 | |||||||
| 22 | =cut |