blib/lib/WebService/Bugzilla/Exception.pm

filter: Statementstmt 69.5% 16 / 23 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 100% 2 / 2 totaltotal 62.8% 22 / 35 CC 3 SCAR 16.6
CC
3
Cov
59%
as_string
12.0
throw
2.0
BEGIN
1.0
CRAP 5.2
« blib/lib/WebService/Bugzilla/Classification.pm ↑ Summary blib/lib/WebService/Bugzilla/Group.pm »
1 #!/usr/bin/false
2 # ABSTRACT: Exception class for WebService::Bugzilla HTTP errors
3 # PODNAME: WebService::Bugzilla::Exception
4  
5 package WebService::Bugzilla::Exception 0.001;
6 1 ▶use strictures 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use overload '""' => \&as_string, fallback => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 has bz_code => (is => 'ro');
12 1 has http_status => (is => 'ro');
13 1 has message => (is => 'ro', required => 1);
14  
15 0 ▶sub as_string {
Subroutine as_string: not called CC=3 SCAR=24.8
Pod documented
16 0 my ($self) = @_;
17 0 my $str = $self->message;
18 0 ▶ $str .= ' [bz:' . $self->bz_code . ']'
Branch: 1 branch
BranchTrueFalseTotal
if defined $self->bz_code 0 0 0
19 if defined $self->bz_code;
20 0 ▶ $str .= ' [http:' . $self->http_status . ']'
Branch: 1 branch
BranchTrueFalseTotal
if defined $self->http_status 0 0 0
21 if defined $self->http_status;
22 0 return $str;
23 }
24  
25 0 ▶sub throw {
Subroutine throw: not called CC=1 SCAR=6.9
Pod documented
26 0 my ($class, %args) = @_;
27 0 die $class->new(%args);
28 }
29  
30 1 1;
31  
32 __END__
« blib/lib/WebService/Bugzilla/Classification.pm ↑ Summary blib/lib/WebService/Bugzilla/Group.pm »