Reporter.pm

filter: Statementstmt 67.8% 19 / 28 Branchbran n/a Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 77.7% 7 / 9 Podpod 66.6% 2 / 3 totaltotal 56.0% 28 / 50 CC 3 SCAR 10.4
CC
3
Cov
56%
notImplemented
6.0
AUTOLOAD
6.0
BEGIN
1.0
CRAP 2.8
« Message/Convert/MailInternet.pm ↑ Summary Message/Body/Nested.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::Reporter;{
13 57 our $VERSION = '4.05';
14 }
15  
16  
17 57 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 57 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 57 ▶use Log::Report 'mail-message', import => [ qw/__x error panic warning/ ];
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 57 ▶use Scalar::Util qw/dualvar blessed/;
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 #--------------------
25  
26 sub new(@)
27 1162 ▶{ my $class = shift;
Subroutine new: called CC=1 SCAR=0.0
Pod documented
28 1162 (bless +{}, $class)->init( +{@_} );
29 }
30  
31 1144 ▶sub init($) { shift }
Subroutine init: called CC=1 SCAR=0.0
Pod undocumented
32  
33 #--------------------
34  
35 #--------------------
36  
37 sub notImplemented(@)
38 0 ▶{ my $self = shift;
Subroutine notImplemented: not called CC=2 SCAR=17.9
Pod documented
39 0 ▶ my $package = ref $self || $self;
Condition0%0/3
ref $self || $self
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
40 0 my $sub = (caller 1)[3];
41  
42 0 error __x"class {package} does not implement method {method}.", class => $package, method => $sub;
43 }
44  
45  
46 sub AUTOLOAD(@)
47 0 ▶{ my $thing = shift;
Subroutine AUTOLOAD: not called CC=2 SCAR=17.9
48 0 our $AUTOLOAD;
49 0 ▶ my $class = ref $thing || $thing;
Condition0%0/3
ref $thing || $thing
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $thing || $thing
ref $thing $thing
Truth table0%0/3
A || B
A= ref $thingB= $thing
ABresult
1X1
011
000
50 0 my $method = $AUTOLOAD =~ s/^.*\:\://r;
51  
52 0 panic "method $method() is not defined for a $class.";
53 }
54  
55 #--------------------
56  
57 5160 ▶sub DESTROY { $_[0] }
Subroutine DESTROY: called CC=1 SCAR=0.0
58  
59 57 1;
« Message/Convert/MailInternet.pm ↑ Summary Message/Body/Nested.pm »