blib/lib/VM/EC2/VPC/PeeringConnection/StateReason.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
valid_fields
2.0
as_string
2.0
BEGIN
2.0
CRAP 2.0
1 package VM::EC2::VPC::PeeringConnection::StateReason;
2  
3 =head1 NAME
4  
5 VM::EC2::VPC::PeeringConnection::StateReason - Virtual Private Cloud Peering
6 Connection State Reason
7  
8 =head1 SYNOPSIS
9  
10 use VM::EC2;
11  
12 my $ec2 = VM::EC2->new(...);
13 my $pcx = $ec2->describe_vpc_peering_connections(-vpc_peering_connection_id=>'pcx-12345678');
14 my $status = $pcx->status;
15 print $status->message,"\n";
16  
17 =head1 DESCRIPTION
18  
19 This object represents an Amazon EC2 VPC Peering Connection State Reason as returned in
20 a VPC Peering Connection.
21  
22 =head1 METHODS
23  
24 These object methods are supported:
25  
26 code -- The status code of the VPC peering connection
27 Valid values:
28 initiating-request | pending-acceptance | failed | expired |
29 provisioning | active | deleted | rejected
30 message -- A message that provides more information about the status,
31 if applicable
32  
33 =head1 STRING OVERLOADING
34  
35 When used in a string context, this object will interpolate a string containing
36 the code and message in format "[code] message"
37  
38 =head1 SEE ALSO
39  
40 L<VM::EC2>
41 L<VM::EC2::Generic>
42 L<VM::EC2::VPC>
43 L<VM::EC2::VPC::PeeringConnection>
44  
45 =head1 AUTHOR
46  
47 Lance Kinley E<lt>lkinley@loyaltymethods.comE<gt>.
48  
49 Copyright (c) 2014 Loyalty Methods, Inc.
50  
51 This package and its accompanying libraries is free software; you can
52 redistribute it and/or modify it under the terms of the GPL (either
53 version 1, or at your option, any later version) or the Artistic
54 License 2.0. Refer to LICENSE for the full license text. In addition,
55 please see DISCLAIMER.txt for disclaimers of warranty.
56  
57 =cut
58  
59 use strict;
60 use base 'VM::EC2::Generic';
61 use Carp 'croak';
62  
63 use overload '""' => sub { shift->as_string },
64 fallback => 1;
65  
66 sub valid_fields {
67 my $self = shift;
68 return qw(code message);
69 }
70  
71 sub as_string {
72 my $self = shift;
73 return '[' . $self->code . '] ' . $self->message;
74 }
75  
76 1;