lib/Ubic/Result.pm

filter: Statementstmt 100% 23 / 23 Branchbran 100% 2 / 2 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 94.5% 35 / 37 SCAR 11.0
CC
3
Cov
96%
result
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« lib/Ubic/AccessGuard.pm ↑ Summary tfiles/service/slow-service »
1 package Ubic::Result;
2 174 $Ubic::Result::VERSION = '1.59';
3 174 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 174 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 # ABSTRACT: common return value for many ubic interfaces
7  
8  
9 174 ▶use Ubic::Result::Class;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 174 ▶use Scalar::Util qw(blessed);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 174 ▶use parent qw(Exporter);
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 174 our @EXPORT_OK = qw(
14 result
15 );
16 174 our %EXPORT_TAGS = (
17 all => \@EXPORT_OK,
18 );
19  
20 sub result {
21 708 ▶ my ($str, $msg) = @_;
Subroutine result: called CC=3 SCAR=11.0
Pod documented
22 708 ▶ if (blessed $str and $str->isa('Ubic::Result::Class')) {
Branch: 1 branch
BranchTrueFalseTotal
if (builtin::blessed($str) and $str->isa("Ubic::Result::Class")) 351 357 708
Condition66%2/3
builtin::blessed($str) and $str->isa("Ubic::Result::Class")
!ll&&!rl&&r
3570351
MC/DC50%1/2
builtin::blessed($str) and $str->isa("Ubic::Result::Class")
builtin::blessed($str) $str->isa("Ubic::Result::Class")
Truth table66%2/3
A and B
A= builtin::blessed($str)B= $str->isa("Ubic::Result::Class")
ABresult
0X0
100
111
23 351 return $str;
24 }
25 357 return Ubic::Result::Class->new({ type => "$str", msg => $msg });
26 }
27  
28  
29 174 1;
30  
31 __END__
« lib/Ubic/AccessGuard.pm ↑ Summary tfiles/service/slow-service »