Twilio/Exceptions/TwilioException.pm

filter: Statementstmt 100% 18 / 18 Branchbran n/a Conditioncond 100% 4 / 4 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 9 / 9 Podpod 100% 4 / 4 totaltotal 100% 37 / 37 CC 3 SCAR 4.4
CC
3
Cov
100%
new
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« Twilio/Rest/Video/V1.pm ↑ Summary Twilio/Rest/Api/V2010/Account/Sip.pm »
1 package Twilio::Exceptions::TwilioException;
2  
3 26 ▶use 5.016;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 26 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 use overload
7 58 ▶ q{""} => sub { $_[0]->get_message },
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
8 1 ▶ bool => sub { 1 },
Subroutine __ANON__: called CC=1 SCAR=0.0
9 26 fallback => 1;
10  
11 26 our $VERSION = '2.001';
12  
13 140 ▶sub new {
Subroutine new: called CC=3 SCAR=11.0
Pod documented
14 140 my ($class, $message, $code) = @_;
15 140 ▶ return bless { message => $message // q{}, code => $code // 0 }, $class;
Condition100%4/4
$message // ""
l!l
1391
$code // 0
l!l
5684
MC/DC100%1/1
$message // ""
$message
MC/DC100%1/1
$code // 0
$code
Truth table100%2/2
A
A= $message
Aresult
11
00
Truth table100%2/2
A
A= $code
Aresult
11
00
16 }
17  
18 84 ▶sub throw {
Subroutine throw: called CC=1 SCAR=0.0
Pod documented
19 84 my ($class, @args) = @_;
20 84 die $class->new(@args); ## no critic (ErrorHandling::RequireCarping)
21 }
22  
23 99 ▶sub get_message { return $_[0]{message} }
Subroutine get_message: called CC=1 SCAR=0.0
Pod documented
24 21 ▶sub get_code { return $_[0]{code} }
Subroutine get_code: called CC=1 SCAR=0.0
Pod documented
25  
26 26 1;
27  
28 __END__
« Twilio/Rest/Video/V1.pm ↑ Summary Twilio/Rest/Api/V2010/Account/Sip.pm »