File Coverage

blib/lib/Mail/URLFor/Plugin/RFC2392.pm
Criterion Covered Total %
statement 26 26 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 0 1 0.0
total 34 35 97.1


line stmt bran cond sub pod time code
1             package Mail::URLFor::Plugin::RFC2392;
2 1     1   809 use strict;
  1         2  
  1         33  
3 1     1   8 use Moo 2;
  1         15  
  1         6  
4 1     1   302 use Filter::signatures;
  1         1  
  1         6  
5 1     1   25 no warnings 'experimental::signatures';
  1         2  
  1         41  
6 1     1   26 use feature 'signatures';
  1         3  
  1         66  
7              
8 1     1   613 use URI;
  1         2725  
  1         31  
9 1     1   467 use URI::mid;
  1         1699  
  1         161  
10              
11             =head1 NAME
12              
13             Mail::URLFor::Plugin::RFC2392 - deep links to mails for RFC2392
14              
15             =head1 SYNOPSIS
16              
17             my $r = Mail::URLFor::Plugin::RFC2392->new();
18             my $url = $r->render('123456-abcdef-ghijkl@example.com');
19             print "See mail";
20              
21             =cut
22              
23             our $VERSION = '0.02';
24              
25 5     5 0 10 sub render($self, $rfc882messageid ) {
  5         16  
  5         9  
  5         8  
26 5         16 return URI->new( $rfc882messageid, 'mid:' )
27             }
28              
29             has 'moniker' => (
30             is => 'ro',
31             default => sub {
32             __PACKAGE__ =~ /.*::(\w+)$/;
33             $1
34             },
35             );
36              
37             1;
38              
39             __END__