File Coverage

blib/lib/Mail/Message/Construct.pm
Criterion Covered Total %
statement 16 19 84.2
branch 2 4 50.0
condition n/a
subroutine 4 4 100.0
pod n/a
total 22 27 81.4


line stmt bran cond sub pod time code
1             # Copyrights 2001-2023 by [Mark Overmeer ].
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;
10 34     34   256 use vars '$VERSION';
  34         74  
  34         1882  
11             $VERSION = '3.013';
12              
13              
14 34     34   216 use strict;
  34         76  
  34         726  
15 34     34   165 use warnings;
  34         64  
  34         8765  
16              
17              
18             our %locations =
19             (
20             bounce => 'Bounce'
21              
22             , build => 'Build'
23             , buildFromBody => 'Build'
24              
25             , forward => 'Forward'
26             , forwardNo => 'Forward'
27             , forwardInline => 'Forward'
28             , forwardAttach => 'Forward'
29             , forwardEncapsulate => 'Forward'
30             , forwardSubject => 'Forward'
31             , forwardPrelude => 'Forward'
32             , forwardPostlude => 'Forward'
33              
34             , read => 'Read'
35              
36             , rebuild => 'Rebuild'
37              
38             , reply => 'Reply'
39             , replySubject => 'Reply'
40             , replyPrelude => 'Reply'
41              
42             , string => 'Text'
43             , lines => 'Text'
44             , file => 'Text'
45             , printStructure => 'Text'
46             );
47              
48             sub AUTOLOAD(@)
49 14     14   4655 { my $self = shift;
50 14         32 our $AUTOLOAD;
51 14         129 (my $call = $AUTOLOAD) =~ s/.*\:\://g;
52              
53 14 50       97 if(my $mod = $locations{$call})
54 14         916 { eval "require Mail::Message::Construct::$mod";
55 14 50       124 die $@ if $@;
56 14         126 return $self->$call(@_);
57             }
58              
59 0           our @ISA; # produce error via Mail::Reporter
60 0           $call = "${ISA[0]}::$call";
61 0           $self->$call(@_);
62             }
63              
64             1;