blib/lib/VM/EC2/ELB/Attributes/CrossZoneLoadBalancing.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 29 CC 1 SCAR 6.9
CC
1
Cov
0%
valid_fields
2.0
Enabled
2.0
BEGIN
2.0
CRAP 2.0
1 package VM::EC2::ELB::Attributes::CrossZoneLoadBalancing;
2  
3 =head1 NAME
4  
5 VM::EC2::ELB:Attributes::CrossZoneLoadBalancing - Object describing the
6 CrossZoneLoadBalancing attribute of an Elastic Load Balancer.
7  
8 =head1 SYNOPSIS
9  
10 use VM::EC2;
11  
12 my $ec2 = VM::EC2->new(...);
13 my $lb = $ec2->describe_load_balancer_attributes('my-lb');
14 my $cross_zone = $lb->CrossZoneLoadBalancing;
15  
16 =head1 DESCRIPTION
17  
18 This object is returned as part of the DescribeLoadBalancerAttributes API call.
19  
20 =head1 METHODS
21  
22 The following object methods are supported:
23
24 Enabled -- Specifies whether cross-zone load balancing is
25 enabled for the load balancer
26  
27 =head1 STRING OVERLOADING
28  
29 When used in a string context, this object will interpolate the
30 instance state.
31  
32 =head1 SEE ALSO
33  
34 L<VM::EC2>
35 L<VM::EC2::Generic>
36 L<VM::EC2::ELB>
37  
38 =head1 AUTHOR
39  
40 Lance Kinley E<lt>lkinley@loyaltymethods.comE<gt>.
41  
42 Copyright (c) 2014 Loyalty Methods, Inc.
43  
44 This package and its accompanying libraries is free software; you can
45 redistribute it and/or modify it under the terms of the GPL (either
46 version 1, or at your option, any later version) or the Artistic
47 License 2.0. Refer to LICENSE for the full license text. In addition,
48 please see DISCLAIMER.txt for disclaimers of warranty.
49  
50 =cut
51  
52 use strict;
53 use base 'VM::EC2::Generic';
54  
55 use overload
56 '""' => sub {
57 my $self = shift;
58 my $string = "Cross Zone Load Balancing:\n";
59 if ($self->Enabled) {
60 $string .= " ENABLED";
61 } else {
62 $string .= " DISABLED";
63 }
64 return $string},
65 fallback => 1;
66  
67 sub valid_fields {
68 my $self = shift;
69 return qw(Enabled);
70 }
71  
72 sub Enabled {
73 my $self = shift;
74 my $enabled = $self->SUPER::Enabled;
75 return $enabled eq 'true';
76 }
77  
78 1;