MMM/Report/Console.pm

filter: Statementstmt 53.8% 7 / 13 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 66.6% 2 / 3 Podpod 100% 1 / 1 totaltotal 35.7% 10 / 28 CC 5 SCAR 30.8
CC
5
Cov
32%
body_queue
30.0
BEGIN
1.0
BEGIN
1.0
CRAP 21.7
« MMM/Report/Mail.pm ↑ Summary MMM/Sync/Rsync.pm »
1 package MMM::Report::Console;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use base qw(MMM::Report);
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 =head1 NAME
7  
8 MMM::Report::Console
9  
10 =head1 SYNOPSIS
11  
12 use MMM::Report::Console;
13 my $mmm = MMM::Report::Console->new( configfile => $file );
14 $mmm->run();
15  
16 =head1 DESCRIPTION
17  
18 Produce textual report of MMM work done.
19  
20 =head1 SEE ALSO
21  
22 L<MMM>
23 L<MMM::Report>
24 L<MMM::Html>
25  
26 =cut
27  
28 0 ▶sub body_queue {
Subroutine body_queue: not called CC=5 SCAR=34.0
Pod documented
29 0 my ($self, $queue, %info) = @_;
30 0 printf("%s (%s)\n", $queue->name, $queue->dest);
31 printf(" last %s end %s\n",
32 $info{job}{success} ? 'mirror' : 'try',
33 0 ▶ $info{job}{end} ? scalar (gmtime($info{job}{end})) : '(N/A)',
Branch: 2 branches
BranchTrueFalseTotal
$info{'job'}{'success'} ? : 0 0 0
$info{'job'}{'end'} ? : 0 0 0
34 );
35 0 ▶ if (!$info{job}{success} && $info{success}{end}) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $info{"job"}{"success"} and $info{"success"}{"end"}) 0 0 0
Condition0%0/3
not $info{"job"}{"success"} and $info{"success"}{"end"}
!ll&&!rl&&r
000
MC/DC0%0/2
not $info{"job"}{"success"} and $info{"success"}{"end"}
not $info{"job"}{"success"} $info{"success"}{"end"}
Truth table0%0/3
not(A) and B
A= not $info{"job"}{"success"}B= $info{"success"}{"end"}
ABresult
0X0
100
111
36 0 printf(" last mirror succefully done %s\n", scalar (gmtime($info{success}{end})));
37 }
38 0 print "\n";
39 }
40  
41 3 1;
42  
43 =head1 AUTHOR
44  
45 Olivier Thauvin <nanardon@nanardon.zarb.org>
46  
47 =head1 COPYRIGHT AND LICENSE
48  
49 Copyright (C) 2006 Olivier Thauvin
50  
51 This program is free software; you can redistribute it and/or
52 modify it under the terms of the GNU General Public License
53 as published by the Free Software Foundation; either version 2
54 of the License, or (at your option) any later version.
55  
56 This program is distributed in the hope that it will be useful,
57 but WITHOUT ANY WARRANTY; without even the implied warranty of
58 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
59 GNU General Public License for more details.
60  
61 You should have received a copy of the GNU General Public License
62 along with this program; if not, write to the Free Software
63 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
64  
65 =cut
66  
« MMM/Report/Mail.pm ↑ Summary MMM/Sync/Rsync.pm »