MonM/ConfigSkel.pm untested

filter: Statementstmt 0.0% 0 / 35 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 45 CC 1 SCAR 6.9
CC
1
Cov
0%
build
2.0
dirs
2.0
pool
2.0
CRAP 2.0
1 package App::MonM::ConfigSkel; # $Id: ConfigSkel.pm 134 2022-09-09 10:33:00Z abalama $
2 use strict;
3 use utf8;
4  
5 =encoding utf8
6  
7 =head1 NAME
8  
9 App::MonM::ConfigSkel - Configuration skeleton for App::MonM
10  
11 =head1 VIRSION
12  
13 Version 1.02
14  
15 =head1 SYNOPSIS
16  
17 none
18  
19 =head1 DESCRIPTION
20  
21 Configuration skeleton for App::MonM
22  
23 no public methods
24  
25 =head2 build, dirs, pool
26  
27 Main methods. For internal use only
28  
29 =head1 SEE ALSO
30  
31 L<App::MonM>, L<CTK::Skel>
32  
33 =head1 AUTHOR
34  
35 Serż Minus (Sergey Lepenkov) L<https://www.serzik.com> E<lt>abalama@cpan.orgE<gt>
36  
37 =head1 COPYRIGHT
38  
39 Copyright (C) 1998-2022 D&D Corporation. All Rights Reserved
40  
41 =head1 LICENSE
42  
43 This program is free software; you can redistribute it and/or
44 modify it under the same terms as Perl itself.
45  
46 See C<LICENSE> file and L<https://dev.perl.org/licenses/>
47  
48 =cut
49  
50 use constant SIGNATURE => "config";
51  
52 use vars qw/ $VERSION /;
53 $VERSION = '1.02';
54  
55 sub build { # Building
56 my $self = shift;
57  
58 my $rplc = $self->{rplc};
59 $rplc->{ENDSIGN} = "__END__"; # END signature
60  
61 $self->maybe::next::method();
62 return 1;
63 }
64 sub dirs { # Directories and permissions as array of hashs
65 my $self = shift;
66 $self->{subdirs}{(SIGNATURE)} = [
67 {
68 path => 'conf.d',
69 mode => 0755,
70 },
71 ];
72 $self->maybe::next::method();
73 return 1;
74 }
75 sub pool { # Multipart pool of files
76 my $self = shift;
77 my $pos = tell DATA;
78 my $data = scalar(do { local $/; <DATA> });
79 seek DATA, $pos, 0;
80 $self->{pools}{(SIGNATURE)} = $data;
81 $self->maybe::next::method();
82 return 1;
83 }
84  
85 1;
86  
87 __DATA__