Client/Exception.pm

filter: Statementstmt 37.9% 11 / 29 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 30.0% 3 / 10 Podpod 83.3% 5 / 6 totaltotal 33.3% 19 / 57 CC 5 SCAR 20.1
CC
5
Cov
29%
stringify
20.0
new
6.0
throw
2.0
CRAP 7.4
« Client/User.pm ↑ Summary Client/Bugzilla.pm »
1 #!/bin/false
2 # PODNAME: BZ::Client::Exception
3 # ABSTRACT: Exception class thrown by BZ::Client in case of errors.
4  
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 package BZ::Client::Exception;
9 1 $BZ::Client::Exception::VERSION = '4.91';
10 0 ▶use overload '""' => \&stringify, 'bool' => sub { 1 }, fallback => 1;
Subroutine BEGIN: called CC=1 SCAR=0.2
Subroutine __ANON__: not called CC=1 SCAR=0.2
11  
12 0 ▶sub stringify {
Subroutine stringify: not called CC=4 SCAR=30.0
Pod undocumented
13 0 my $self = shift;
14 0 ▶ my $msg = $self->{'message'} // 'Unknown error';
Condition0%0/2
$self->{"message"} // "Unknown error"
l!l
00
MC/DC0%0/1
$self->{"message"} // "Unknown error"
$self->{"message"}
Truth table0%0/2
A
A= $self->{"message"}
Aresult
11
00
15 0 ▶ $msg .= ' (HTTP ' . $self->{'http_code'} . ')' if $self->{'http_code'};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"http_code"} 0 0 0
16 0 ▶ $msg .= ' (XMLRPC ' . $self->{'xmlrpc_code'} . ')' if $self->{'xmlrpc_code'};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"xmlrpc_code"} 0 0 0
17 0 return $msg
18 }
19  
20 0 ▶sub throw {
Subroutine throw: not called CC=1 SCAR=6.9
Pod documented
21 0 my $class = shift;
22 0 die $class->new(@_)
23 }
24  
25 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod documented
26 0 my $class = shift;
27 0 my $self = { @_ };
28 0 ▶ bless($self, ref($class) || $class);
Condition0%0/3
ref $class || $class
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table0%0/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
29 0 return $self
30 }
31  
32 0 ▶sub message {
Subroutine message: not called CC=1 SCAR=6.9
Pod documented
33 0 my $self = shift;
34 0 return $self->{'message'}
35 }
36  
37 0 ▶sub xmlrpc_code {
Subroutine xmlrpc_code: not called CC=1 SCAR=6.9
Pod documented
38 0 my $self = shift;
39 0 return $self->{'xmlrpc_code'}
40 }
41  
42 0 ▶sub http_code {
Subroutine http_code: not called CC=1 SCAR=6.9
Pod documented
43 0 my $self = shift;
44 0 return $self->{'http_code'}
45 }
46  
47 1 1;
48  
49 __END__
« Client/User.pm ↑ Summary Client/Bugzilla.pm »