| 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"
MC/DC0%0/1
$self->{"message"} // "Unknown error"
$self->{"message"}
Truth table0%0/2
A
A= $self->{"message"}
| |||||||||||||||||||||
| 15 | 0 | ▶ | $msg .= ' (HTTP ' . $self->{'http_code'} . ')' if $self->{'http_code'}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 16 | 0 | ▶ | $msg .= ' (XMLRPC ' . $self->{'xmlrpc_code'} . ')' if $self->{'xmlrpc_code'}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 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
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table0%0/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||
| 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__ | ||||||||||||||||||||