File Coverage

blib/lib/CloudHealth/API/Credentials.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package CloudHealth::API::Credentials;
2 2     2   1025 use Moo;
  2         6  
  2         14  
3 2     2   697 use Types::Standard qw/Maybe Str Bool/;
  2         5  
  2         17  
4              
5             has api_key => (
6             is => 'ro',
7             isa => Maybe[Str],
8             required => 1,
9             default => sub { $ENV{ CLOUDHEALTH_APIKEY } }
10             );
11              
12             has is_set => (
13             is => 'ro',
14             isa => Bool,
15             lazy => 1,
16             default => sub {
17             my $self = shift;
18             return defined $self->api_key
19             }
20             );
21             1;