SDK/Error/RateLimit.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 92.0% 23 / 25 CC 2 SCAR 2.9
CC
2
Cov
94%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« SDK/Error/NotFound.pm ↑ Summary SDK/Resource/Encryption.pm »
1 package Apertur::SDK::Error::RateLimit;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use parent 'Apertur::SDK::Error';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod documented
8 1 my ($class, %args) = @_;
9 my $self = $class->SUPER::new(
10 status_code => 429,
11 code => 'RATE_LIMIT',
12 1 ▶ message => $args{message} // 'Rate limit exceeded',
Condition50%1/2
$args{"message"} // "Rate limit exceeded"
l!l
10
MC/DC0%0/1
$args{"message"} // "Rate limit exceeded"
$args{"message"}
Truth table50%1/2
A
A= $args{"message"}
Aresult
11
00
13 );
14 1 $self->{retry_after} = $args{retry_after};
15 1 return $self;
16 }
17  
18 1 ▶sub retry_after { return $_[0]->{retry_after} }
Subroutine retry_after: called CC=1 SCAR=0.0
Pod documented
19  
20 1 1;
21  
22 __END__
« SDK/Error/NotFound.pm ↑ Summary SDK/Resource/Encryption.pm »