Acmeman/Source/Default.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 29 CC 2 SCAR 12.0
CC
2
Cov
0%
new
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.3
1 package App::Acmeman::Source::Default;
2 use strict;
3 use warnings;
4 use parent 'App::Acmeman::Source';
5  
6 sub new {
7 shift; # Skip class name.
8 my $self = eval {
9 require App::Acmeman::Source::Apache;
10 new App::Acmeman::Source::Apache(@_);
11 };
12 if ($@) {
13 (my $s = $@) =~ s{ at /.+$}{};
14 chomp($s);
15 die <<EOT;
16 No valid domain source configured.
17  
18 You are seeing this error because acmeman was unable to load the default
19 domain source module.
20
21 The default domain source "apache" scans Apache configuration files and
22 extracts names listed in ServerName and ServerAlias directives which have
23 LetsEncrypt certificates configured.
24  
25 The source module couldn't be loaded because of the following error:
26  
27 "$s"
28
29 If you are going to use the "apache" source, fix this error and retry.
30 Otherwise, please create the /etc/acmeman.conf configuration file, and
31 configure another domain source, for example:
32  
33 [core]
34 source = file DOMAINFILE
35  
36 Please, see acmeman(1) (or run "acmeman --help") for a detailed discussion
37 of available domain sources.
38  
39 EOT
40 ;
41 }
42 return $self;
43 }
44  
45 1;
46  
47