blib/lib/VM/EC2/ELB/TagDescription.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 22 CC 2 SCAR 12.8
CC
2
Cov
0%
Tags
6.0
valid_fields
2.0
BEGIN
2.0
CRAP 3.6
1 package VM::EC2::ELB::TagDescription;
2  
3 =head1 NAME
4  
5 VM::EC2::ELB:TagDescription - Load Balancer Tag Description
6  
7 =head1 DESCRIPTION
8  
9 This object is used to contain the TagDescription data type.
10 It one of the response elements of the DescribeTags API call.
11 This data type is not returned by any function.
12  
13 =head1 METHODS
14  
15 The following object methods are supported:
16
17 LoadBalancerName -- Returns the load balancer name.
18 Tags -- Returns a hash of tags associated with the load balancer
19  
20 =head1 STRING OVERLOADING
21  
22 NONE.
23  
24 =head1 SEE ALSO
25  
26 L<VM::EC2>
27 L<VM::EC2::Generic>
28 L<VM::EC2::ELB>
29  
30 =head1 AUTHOR
31  
32 Lance Kinley E>lb>lkinley@loyaltymethods.comE>gt>.
33  
34 Copyright (c) 2014 Loyalty Methods, Inc.
35  
36 This package and its accompanying libraries is free software; you can
37 redistribute it and/or modify it under the terms of the GPL (either
38 version 1, or at your option, any later version) or the Artistic
39 License 2.0. Refer to LICENSE for the full license text. In addition,
40 please see DISCLAIMER.txt for disclaimers of warranty.
41  
42 =cut
43  
44 use strict;
45 use base 'VM::EC2::Generic';
46  
47 sub valid_fields {
48 my $self = shift;
49 return qw(LoadBalancerName Tags);
50 }
51  
52 sub Tags {
53 my $self = shift;
54 # cannot use $self->SUPER::Tags as the AUTOLOAD will find the Generic ->tags function
55 my $tags = $self->{data}{'Tags'};
56 my %tags = map { $_->{Key}, $_->{Value} } @{$tags->{member}};
57 return wantarray ? %tags : \%tags;
58 }
59  
60 1;