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

filter: Statementstmt 0.0% 0 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 18 CC 1 SCAR 6.9
CC
1
Cov
0%
valid_fields
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package VM::EC2::ELB::PolicyAttribute;
2  
3 =head1 NAME
4  
5 VM::EC2::ELB::PolicyAttribute - Elastic Load Balancer Policy Attribute
6  
7 =head1 SYNOPSIS
8  
9 use VM::EC2;
10  
11 my $ec2 = VM::EC2->new(...);
12 my @policies = $ec2->describe_load_balancer_policies(-load_balancer_name=>'my-lb');
13 foreach my $p (@policies) {
14 my @attr = $p->policy_attributes;
15 foreach (@attr) {
16 print $_,"\n";
17 }
18 }
19
20 =head1 DESCRIPTION
21  
22 This object is used to describe the ELB PolicyAttribute data type, which is
23 part of the result of a DescribeLoadBalancerPolicies API call.
24  
25 =head1 METHODS
26  
27 The following object methods are supported:
28
29 AttributeName -- Policy Attribute Name
30 AttributeValue -- Policy Attribute Value
31  
32 =head1 STRING OVERLOADING
33  
34 In string context, the object will return an attribute name=value pair.
35  
36 =head1 SEE ALSO
37  
38 L<VM::EC2>
39 L<VM::EC2::Generic>
40 L<VM::EC2::ELB>
41 L<VM::EC2::ELB::Policies>
42  
43 =head1 AUTHOR
44  
45 Lance Kinley E<lt>lkinley@loyaltymethods.comE<gt>.
46  
47 Copyright (c) 2012 Loyalty Methods, Inc.
48  
49 This package and its accompanying libraries is free software; you can
50 redistribute it and/or modify it under the terms of the GPL (either
51 version 1, or at your option, any later version) or the Artistic
52 License 2.0. Refer to LICENSE for the full license text. In addition,
53 please see DISCLAIMER.txt for disclaimers of warranty.
54  
55 =cut
56  
57 use strict;
58 use base 'VM::EC2::Generic';
59  
60 use overload
61 '""' => sub {
62 my $self = shift;
63 return $self->AttributeName . '=' . $self->AttributeValue},
64 fallback => 1;
65  
66 sub valid_fields {
67 my $self = shift;
68 return qw(AttributeName AttributeValue);
69 }
70  
71 1;