VastAI/Object.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 2 / 2 totaltotal 100% 18 / 18 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
id
1.0
raw
1.0
CRAP 1.0
« VastAI/Invoice.pm ↑ Summary VastAI/Role/IO.pm »
1 package WWW::VastAI::Object;
2 11 our $VERSION = '0.001';
3 # ABSTRACT: Base entity wrapper for Vast.ai API resources
4  
5 11 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 11 has _client => (
8 is => 'ro',
9 required => 1,
10 weak_ref => 1,
11 init_arg => 'client',
12 );
13  
14 11 has data => (
15 is => 'rw',
16 required => 1,
17 );
18  
19 21 ▶sub id { shift->data->{id} }
Subroutine id: called CC=1 SCAR=0.0
Pod documented
20 4 ▶sub raw { shift->data }
Subroutine raw: called CC=1 SCAR=0.0
Pod documented
21  
22 3 ▶sub _replace_data {
Subroutine _replace_data: called CC=1 SCAR=0.0
23 3 my ($self, $data) = @_;
24 3 $self->data($data);
25 3 return $self;
26 }
27  
28 11 1;
29  
30 __END__
« VastAI/Invoice.pm ↑ Summary VastAI/Role/IO.pm »