line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
1503
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
70
|
|
2
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
103
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Net::Amazon::Config::Profile; |
5
|
|
|
|
|
|
|
# ABSTRACT: Amazon credentials for given profile |
6
|
|
|
|
|
|
|
our $VERSION = '0.002'; # VERSION |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
1838
|
use Params::Validate (); |
|
2
|
|
|
|
|
24060
|
|
|
2
|
|
|
|
|
113
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
my @attributes; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
BEGIN { |
13
|
2
|
|
|
2
|
|
46
|
@attributes = qw( |
14
|
|
|
|
|
|
|
profile_name |
15
|
|
|
|
|
|
|
access_key_id |
16
|
|
|
|
|
|
|
secret_access_key |
17
|
|
|
|
|
|
|
certificate_file |
18
|
|
|
|
|
|
|
private_key_file |
19
|
|
|
|
|
|
|
ec2_keypair_name |
20
|
|
|
|
|
|
|
ec2_keypair_file |
21
|
|
|
|
|
|
|
cf_keypair_id |
22
|
|
|
|
|
|
|
cf_private_key_file |
23
|
|
|
|
|
|
|
aws_account_id |
24
|
|
|
|
|
|
|
canonical_user_id |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
2
|
|
|
2
|
|
1729
|
use Object::Tiny @attributes; |
|
2
|
|
|
|
|
703
|
|
|
2
|
|
|
|
|
15
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub new { |
31
|
3
|
|
|
3
|
0
|
4008
|
my ( $class, $first, @rest ) = @_; |
32
|
3
|
100
|
|
|
|
22
|
my @args = ref $first eq 'ARRAY' ? (@$first) : ( $first, @rest ); |
33
|
3
|
|
|
|
|
10
|
my %args = Params::Validate::validate( @args, { map { $_ => 0 } @attributes } ); |
|
33
|
|
|
|
|
205
|
|
34
|
3
|
|
|
|
|
42
|
return bless \%args, $class; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |