File Coverage

blib/lib/Mail/Reporter.pm
Criterion Covered Total %
statement 16 25 64.0
branch n/a
condition 0 6 0.0
subroutine 7 9 77.7
pod 2 3 66.6
total 25 43 58.1


line stmt bran cond sub pod time code
1             # This code is part of Perl distribution Mail-Message version 4.04.
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             our $VERSION = '4.04';
14             }
15              
16              
17 57     57   399917 use strict;
  57         152  
  57         2588  
18 57     57   490 use warnings;
  57         166  
  57         4705  
19              
20 57     57   10915 use Log::Report 'mail-message', import => [ qw/__x error panic warning/ ];
  57         2430593  
  57         676  
21              
22 57     57   14250 use Scalar::Util qw/dualvar blessed/;
  57         138  
  57         23311  
23              
24             #--------------------
25              
26             sub new(@)
27 1163     1163 1 2527268 { my $class = shift;
28 1163         8468 (bless +{}, $class)->init( +{@_} );
29             }
30              
31 1145     1145 0 3700 sub init($) { shift }
32              
33             #--------------------
34              
35             #--------------------
36              
37             sub notImplemented(@)
38 0     0 1 0 { my $self = shift;
39 0   0     0 my $package = ref $self || $self;
40 0         0 my $sub = (caller 1)[3];
41              
42 0         0 error __x"class {package} does not implement method {method}.", class => $package, method => $sub;
43             }
44              
45              
46             sub AUTOLOAD(@)
47 0     0   0 { my $thing = shift;
48 0         0 our $AUTOLOAD;
49 0   0     0 my $class = ref $thing || $thing;
50 0         0 my $method = $AUTOLOAD =~ s/^.*\:\://r;
51              
52 0         0 panic "method $method() is not defined for a $class.";
53             }
54              
55             #--------------------
56              
57 5161     5161   181035 sub DESTROY { $_[0] }
58              
59             1;