File Coverage

blib/lib/Paws/Credential/Environment.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 Paws::Credential::Environment;
2 1     1   893 use Moose;
  1         2  
  1         7  
3              
4             has access_key => (is => 'ro', default => sub { $ENV{AWS_ACCESS_KEY} || $ENV{AWS_ACCESS_KEY_ID} });
5             has secret_key => (is => 'ro', default => sub { $ENV{AWS_SECRET_KEY} || $ENV{AWS_SECRET_ACCESS_KEY} });
6             has session_token => (is => 'ro', default => sub { $ENV{AWS_SESSION_TOKEN} });
7              
8             with 'Paws::Credential';
9              
10 1     1   6314 no Moose;
  1         2  
  1         5  
11             1;
12             ### main pod documentation begin ###
13              
14             =encoding UTF-8
15              
16             =head1 NAME
17              
18             Paws::Credential::Environment
19              
20             =head1 SYNOPSIS
21              
22             use Paws::Credential::Environment;
23              
24             my $paws = Paws->new(config => {
25             credentials => Paws::Credential::Enviroment->new
26             });
27              
28             =head1 DESCRIPTION
29              
30             The Environment provider retrieves credentials from environment variables: C<AWS_ACCESS_KEY_ID> and C<AWS_SECRET_ACCESS_KEY>,
31             or alternately C<AWS_ACCESS_KEY> and C<AWS_SECRET_KEY>. It will also try to retrieve the optional session token from C<AWS_SESSION_TOKEN>
32              
33             =cut