cdnget/Exception.pm

filter: Statementstmt 59.0% 13 / 22 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 47.3% 18 / 38 CC 4 SCAR 22.5
CC
4
Cov
45%
msg
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 9.4
↑ Summary cdnget.pm »
1 package App::cdnget::Exception;
2 1 ▶use Object::Base qw(Object::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use v5.14;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use bytes;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use DateTime;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7  
8 BEGIN
9 1 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 our $VERSION = '0.03';
11 }
12  
13  
14 0 ▶sub msg :lvalue
Subroutine msg: not called CC=4 SCAR=30.0
Pod undocumented
15 {
16 0 my $self = shift;
17 0 my ($msg) = @_;
18 0 my @args = @_;
19 0 ▶ if (@args >= 1 and not ref($msg))
Branch: 1 branch
BranchTrueFalseTotal
if (@args >= 1 and not ref $msg) 0 0 0
Condition0%0/3
@args >= 1 and not ref $msg
!ll&&!rl&&r
000
MC/DC0%0/2
@args >= 1 and not ref $msg
@args >= 1 not ref $msg
Truth table0%0/3
A and not(B)
A= @args >= 1B= not ref $msg
ABresult
0X0
100
111
20 {
21 0 ▶ $msg = "Unknown" unless $msg;
Branch: 1 branch
BranchTrueFalseTotal
unless $msg 0 0 0
22 0 my $dts = DateTime->now(time_zone => POSIX::strftime("%z", localtime), locale => "en")->strftime('%x %T %z');
23 0 $msg = "[$dts] $msg";
24 0 $args[0] = $msg;
25 }
26 0 $self->SUPER::msg(@args);
27 }
28  
29  
30 1 1;
31 __END__
↑ Summary cdnget.pm »