Message/Construct.pm

filter: Statementstmt 86.3% 19 / 22 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 83.3% 25 / 30 SCAR 11.2
CC
3
Cov
81%
AUTOLOAD
3.4
BEGIN
1.0
BEGIN
1.0
CRAP 3.1
« Message/TransferEnc.pm ↑ Summary Message/TransferEnc/QuotedPrint.pm »
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;
10 34 ▶use vars '$VERSION';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 34 $VERSION = '3.013';
12  
13  
14 34 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 34 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17  
18 34 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 ▶{ my $self = shift;
Subroutine AUTOLOAD: called CC=3 SCAR=12.3
50 14 our $AUTOLOAD;
51 14 (my $call = $AUTOLOAD) =~ s/.*\:\://g;
52  
53 14 ▶ if(my $mod = $locations{$call})
Branch: 1 branch
BranchTrueFalseTotal
if (my $mod = $Mail::Message::locations{$call}) 14 0 14
54 14 { eval "require Mail::Message::Construct::$mod";
55 14 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 14 14
56 14 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 34 1;
« Message/TransferEnc.pm ↑ Summary Message/TransferEnc/QuotedPrint.pm »