blib/lib/VM/EC2/DB/Option.pm untested

filter: Statementstmt 0.0% 0 / 34 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 12 Podpod 0.0% 0 / 7 totaltotal 0.0% 0 / 61 CC 5 SCAR 17.5
CC
5
Cov
0%
DBSecurityGroupMemberships
12.0
VpcSecurityGroupMemberships
12.0
valid_fields
2.0
CRAP 5.8
1 package VM::EC2::DB::Option;
2  
3 =head1 NAME
4  
5 VM::EC2::DB::IPRange - An RDS Database IP Range
6  
7 =head1 SYNOPSIS
8  
9 =head1 DESCRIPTION
10  
11 =head1 STRING OVERLOADING
12  
13 =head1 SEE ALSO
14  
15 L<VM::EC2>
16 L<VM::EC2::Generic>
17 L<VM::EC2::DB::Instance>
18  
19 =head1 AUTHOR
20  
21 Lance Kinley E<lt>lkinley@loyaltymethods.comE<gt>.
22  
23 Copyright (c) 2013 Loyalty Methods, Inc.
24  
25 This package and its accompanying libraries is free software; you can
26 redistribute it and/or modify it under the terms of the GPL (either
27 version 1, or at your option, any later version) or the Artistic
28 License 2.0. Refer to LICENSE for the full license text. In addition,
29 please see DISCLAIMER.txt for disclaimers of warranty.
30  
31 =cut
32  
33 use strict;
34 use base 'VM::EC2::Generic';
35 use VM::EC2::DB::SecurityGroup::Membership;
36 use VM::EC2::DB::VpcSecurityGroup::Membership;
37  
38 use overload '""' => sub { shift->OptionName },
39 fallback => 1;
40  
41 sub valid_fields {
42 my $self = shift;
43 return qw(DBSecurityGroupMemberships OptionDescription OptionName OptionSettings Persistent Port VpcSecurityGroupMemberships);
44 }
45  
46 sub DBSecurityGroupMemberships {
47 my $self = shift;
48 my $groups = $self->SUPER::DBSecurityGroupMemberships;
49 return unless $groups;
50 $groups = $groups->{DBSecurityGroupMembership};
51 return ref $groups eq 'HASH' ?
52 (VM::EC2::DB::SecurityGroup::Membership->new($groups,$self->aws)) :
53 map { VM::EC2::DB::SecurityGroup::Membership->new($_,$self->aws) } @$groups;
54 }
55  
56 sub VpcSecurityGroupMemberships {
57 my $self = shift;
58 my $groups = $self->SUPER::VpcSecurityGroupMemberships;
59 return unless $groups;
60 $groups = $groups->{VpcSecurityGroupMembership};
61 return ref $groups eq 'HASH' ?
62 (VM::EC2::DB::VpcSecurityGroup::Membership->new($groups,$self->aws)) :
63 map { VM::EC2::DB::VpcSecurityGroup::Membership->new($_,$self->aws) } @$groups;
64 }
65  
66 sub db_security_group_memberships { shift->DBSecurityGroupMemberships }
67  
68 sub name { shift->OptionName }
69  
70 sub description { shift->OptionDescription }
71  
72 sub settings { shift->OptionSettings }
73  
74 1;