Enbld/Message.pm

filter: Statementstmt 71.4% 15 / 21 Branchbran 50.0% 4 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 3 totaltotal 62.1% 23 / 37 SCAR 18.0
CC
5
Cov
66%
alert
12.0
notify
3.0
BEGIN
1.0
CRAP 6.0
« Enbld/Target/Attribute/SortedVersionList.pm ↑ Summary Enbld/Target/Attribute/Dependencies.pm »
1 package Enbld::Message;
2  
3 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 7 our $VERBOSE;
7  
8 sub notify {
9 216 ▶ my ( $pkg, $msg ) = @_;
Subroutine notify: called CC=3 SCAR=11.0
Pod undocumented
10  
11 216 chomp( $msg );
12 216 $msg .= "\n";
13  
14 216 require Enbld::Logger;
15 216 ▶ Enbld::Logger->write( $msg ) if Enbld::Logger->logfile;
Branch: 1 branch
BranchTrueFalseTotal
if "Enbld::Logger"->logfile 210 6 216
16
17 216 ▶ print $msg if $VERBOSE;
Branch: 1 branch
BranchTrueFalseTotal
if $Enbld::Message::VERBOSE 2 214 216
18 }
19  
20 sub alert {
21 0 ▶ my ( $pkg, $msg ) = @_;
Subroutine alert: not called CC=3 SCAR=24.8
Pod undocumented
22  
23 0 chomp( $msg );
24 0 $msg .= "\n";
25  
26 0 require Enbld::Logger;
27 0 ▶ Enbld::Logger->write( $msg ) if Enbld::Logger->logfile;
Branch: 1 branch
BranchTrueFalseTotal
if "Enbld::Logger"->logfile 0 0 0
28
29 0 ▶ print STDERR $msg if $VERBOSE;
Branch: 1 branch
BranchTrueFalseTotal
if $Enbld::Message::VERBOSE 0 0 0
30 }
31  
32 sub set_verbose {
33 1 ▶ $VERBOSE++;
Subroutine set_verbose: called CC=1 SCAR=0.0
Pod undocumented
34 }
35  
36 7 1;
37  
« Enbld/Target/Attribute/SortedVersionList.pm ↑ Summary Enbld/Target/Attribute/Dependencies.pm »