VastAI/SSHKey.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 4 / 4 totaltotal 85.1% 23 / 27 CC 2 SCAR 3.5
CC
2
Cov
88%
key
2.3
BEGIN
1.0
created_at
1.0
CRAP 1.4
« VastAI/LWPIO.pm ↑ Summary VastAI/Offer.pm »
1 package WWW::VastAI::SSHKey;
2 11 our $VERSION = '0.001';
3 # ABSTRACT: Account SSH key wrapper with update and delete helpers
4  
5 11 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 11 extends 'WWW::VastAI::Object';
7  
8 2 ▶sub key {
Subroutine key: called CC=2 SCAR=8.1
Pod documented
9 2 my ($self) = @_;
10 2 ▶ return $self->data->{key} // $self->data->{public_key};
Condition33%1/3
$self->data->{"key"} // $self->data->{"public_key"}
l!l&&r!l&&!r
020
MC/DC0%0/2
$self->data->{"key"} // $self->data->{"public_key"}
$self->data->{"key"} $self->data->{"public_key"}
Truth table33%1/3
A // B
A= $self->data->{"key"}B= $self->data->{"public_key"}
ABresult
1X1
011
000
11 }
12 1 ▶sub created_at { shift->data->{created_at} }
Subroutine created_at: called CC=1 SCAR=0.0
Pod documented
13  
14 1 ▶sub update {
Subroutine update: called CC=1 SCAR=0.0
Pod documented
15 1 my ($self, $ssh_key) = @_;
16 1 return $self->_replace_data($self->_client->ssh_keys->update($self->id, $ssh_key)->raw);
17 }
18  
19 1 ▶sub delete {
Subroutine delete: called CC=1 SCAR=0.0
Pod documented
20 1 my ($self) = @_;
21 1 return $self->_client->ssh_keys->delete($self->id);
22 }
23  
24 11 1;
25  
26 __END__
« VastAI/LWPIO.pm ↑ Summary VastAI/Offer.pm »