blib/lib/VM/EC2/Instance/PasswordData.pm untested

filter: Statementstmt 0.0% 0 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 15 CC 1 SCAR 6.9
CC
1
Cov
0%
valid_fields
2.0
password
2.0
BEGIN
2.0
CRAP 2.0
1 package VM::EC2::Instance::PasswordData;
2  
3 =head1 NAME
4  
5 VM::EC2::PasswordData - Object describing the administrative password stored in an EC2 Windows instance
6  
7 =head1 SYNOPSIS
8  
9 use VM::EC2;
10  
11 $ec2 = VM::EC2->new(...);
12 $instance = $ec2->describe_instances(-instance_id=>'i-12345');
13 $pass = $instance->password_data;
14 print $pass->password,"\n";
15 print $pass->timestamp,"\n"
16  
17 =head1 DESCRIPTION
18  
19 This object represents the administrative password stored in a Windows
20 EC2 instance. It is returned by calling either
21 VM::EC2->get_password_data or a VM::EC2::Instance object's
22 password_data() method.
23  
24 =head1 METHODS
25  
26 These object methods are supported:
27
28 instanceId -- ID of the instance
29 timestamp -- The time the data was last updated.
30 passwordData -- The password of the instance.
31 password() -- Same as passwordData().
32  
33 =head1 STRING OVERLOADING
34  
35 When used in a string context, this object will interpolate the
36 password.
37  
38 =head1 SEE ALSO
39  
40 L<VM::EC2>
41 L<VM::EC2::Generic>
42 L<VM::EC2::Instance>
43  
44 =head1 AUTHOR
45  
46 Lincoln Stein E<lt>lincoln.stein@gmail.comE<gt>.
47  
48 Copyright (c) 2011 Ontario Institute for Cancer Research
49  
50 This package and its accompanying libraries is free software; you can
51 redistribute it and/or modify it under the terms of the GPL (either
52 version 1, or at your option, any later version) or the Artistic
53 License 2.0. Refer to LICENSE for the full license text. In addition,
54 please see DISCLAIMER.txt for disclaimers of warranty.
55  
56 =cut
57  
58 use strict;
59 use overload '""' => 'password',
60 fallback => 1;
61  
62 sub valid_fields {
63 my $self = shift;
64 return $self->SUPER::valid_fields,
65 qw(requestId instanceId timestamp passwordData);
66 }
67  
68 sub password {shift->passwordData}
69  
70 1;