Message/Construct.pm

filter: Statementstmt 86.9% 20 / 23 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 83.8% 26 / 31 CC 3 SCAR 7.9
CC
3
Cov
81%
AUTOLOAD
3.4
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
« Message/TransferEnc/Base64.pm ↑ Summary Message/Body/Lines.pm »
1 # This code is part of Perl distribution Mail-Message version 4.05.
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;{
13 37 our $VERSION = '4.05';
14 }
15  
16  
17 37 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 37 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 37 ▶use Log::Report 'mail-message', import => [ qw// ];
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 #--------------------
23  
24 37 our %locations = (
25 bounce => 'Bounce',
26  
27 build => 'Build',
28 buildFromBody => 'Build',
29  
30 forward => 'Forward',
31 forwardNo => 'Forward',
32 forwardInline => 'Forward',
33 forwardAttach => 'Forward',
34 forwardEncapsulate => 'Forward',
35 forwardSubject => 'Forward',
36 forwardPrelude => 'Forward',
37 forwardPostlude => 'Forward',
38  
39 read => 'Read',
40  
41 rebuild => 'Rebuild',
42  
43 reply => 'Reply',
44 replySubject => 'Reply',
45 replyPrelude => 'Reply',
46  
47 string => 'Text',
48 lines => 'Text',
49 file => 'Text',
50 printStructure => 'Text',
51 );
52  
53 sub AUTOLOAD(@)
54 17 ▶{ my $self = shift;
Subroutine AUTOLOAD: called CC=3 SCAR=12.3
55 17 our $AUTOLOAD;
56 17 my $call = $AUTOLOAD =~ s/.*\:\://gr;
57  
58 17 ▶ if(my $mod = $locations{$call})
Branch: 1 branch
BranchTrueFalseTotal
if (my $mod = $Mail::Message::locations{$call}) 17 0 17
59 17 { eval "require Mail::Message::Construct::$mod";
60 17 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 17 17
61 17 return $self->$call(@_);
62 }
63  
64 0 our @ISA; # produce error via Mail::Reporter
65 0 $call = "${ISA[0]}::$call";
66 0 $self->$call(@_);
67 }
68  
69 37 1;
« Message/TransferEnc/Base64.pm ↑ Summary Message/Body/Lines.pm »