File Coverage

blib/lib/Mail/Message/Convert.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition 1 3 33.3
subroutine 6 6 100.0
pod 1 2 50.0
total 26 29 89.6


line stmt bran cond sub pod time code
1             # This code is part of Perl distribution Mail-Message version 4.04.
2             # The POD got stripped from this file by OODoc version 3.06.
3             # For contributors see file ChangeLog.
4              
5             # This software is copyright (c) 2001-2026 by Mark Overmeer.
6              
7             # This is free software; you can redistribute it and/or modify it under
8             # the same terms as the Perl 5 programming language system itself.
9             # SPDX-License-Identifier: Artistic-1.0-Perl OR GPL-1.0-or-later
10              
11              
12             package Mail::Message::Convert;{
13             our $VERSION = '4.04';
14             }
15              
16 7     7   6264 use parent 'Mail::Reporter';
  7         19  
  7         61  
17              
18 7     7   707 use strict;
  7         33  
  7         291  
19 7     7   41 use warnings;
  7         16  
  7         584  
20              
21 7     7   65 use Log::Report 'mail-message', import => [ qw// ];
  7         19  
  7         67  
22              
23             #--------------------
24              
25             sub init($)
26 7     7 0 21 { my ($self, $args) = @_;
27 7         60 $self->SUPER::init($args);
28              
29 7   33     118 $self->{MMC_fields} = $args->{fields} || qr#^(Resent\-)?(To|From|Cc|Bcc|Subject|Date)\b#i;
30 7         24 $self;
31             }
32              
33             #--------------------
34              
35             sub selectedFields($)
36 6     6 1 13 { my ($self, $head) = @_;
37 6         47 $head->grepNames($self->{MMC_fields});
38             }
39              
40             #--------------------
41              
42             1;