Message/Convert/TextAutoformat.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 37 SCAR 6.9
CC
1
Cov
0%
init
2.0
autoformatBody
2.0
BEGIN
2.0
CRAP 2.0
1 # Copyrights 2001-2023 by [Mark Overmeer <markov@cpan.org>].
2 # For other contributors see ChangeLog.
3 # See the manual pages for details on the licensing terms.
4 # Pod stripped from pm file by OODoc 2.03.
5 # This code is part of distribution Mail-Message. Meta-POD processed with
6 # OODoc into POD and HTML manual-pages. See README.md
7 # Copyright Mark Overmeer. Licensed under the same terms as Perl itself.
8  
9 package Mail::Message::Convert::TextAutoformat;
10 use vars '$VERSION';
11 $VERSION = '3.013';
12  
13 use base 'Mail::Message::Convert';
14  
15 use strict;
16 use warnings;
17  
18 use Mail::Message::Body::String;
19 use Text::Autoformat;
20  
21  
22 sub init($)
23 { my ($self, $args) = @_;
24  
25 $self->SUPER::init($args);
26  
27 $self->{MMCA_options} = $args->{autoformat} || { all => 1 };
28 $self;
29 }
30  
31 #------------------------------------------
32  
33  
34 sub autoformatBody($)
35 { my ($self, $body) = @_;
36  
37 ref($body)->new
38 ( based_on => $body
39 , data => autoformat($body->string, $self->{MMCA_options})
40 );
41 }
42  
43 #------------------------------------------
44  
45 1;