Message/Dummy.pm

filter: Statementstmt 90.9% 20 / 22 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 66.6% 2 / 3 totaltotal 82.3% 28 / 34 CC 2 SCAR 4.1
CC
2
Cov
88%
init
2.0
head
2.0
body
2.0
CRAP 1.5
« Message/Body/Delayed.pm ↑ Summary Box/Locker/FcntlLock.pm »
1 # This code is part of Perl distribution Mail-Box version 4.02.
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::Dummy;{
13 4 our $VERSION = '4.02';
14 }
15  
16 4 ▶use parent 'Mail::Message';
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 4 ▶use Log::Report 'mail-box', import => [ qw/__x error/ ];
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 #--------------------
24  
25 sub init($)
26 10 ▶{ my ($self, $args) = @_;
Subroutine init: called CC=2 SCAR=7.0
Pod undocumented
27  
28 10 @$args{ qw/modified trusted/ } = (0, 1);
29 10 $self->SUPER::init($args);
30  
31 exists $args->{messageId}
32 10 ▶ or error __x"the messageId is required for a dummy.";
Branch: 1 branch
BranchTrueFalseTotal
exists $args->{"messageId"} or &error(&__x("the messageId is required for a dummy.")) 10 0 10
33  
34 10 $self;
35 }
36  
37 sub isDummy() { 1 }
38  
39  
40 0 ▶sub head(;$) { error __x"you cannot take the head of a dummy message." }
Subroutine head: not called CC=1 SCAR=6.9
Pod documented
41  
42  
43 0 ▶sub body(;$) { error __x"you cannot take the body of a dummy message." }
Subroutine body: not called CC=1 SCAR=6.9
Pod documented
44  
45 4 1;
« Message/Body/Delayed.pm ↑ Summary Box/Locker/FcntlLock.pm »