| 1 | package VM::EC2::Generic; | ||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||
| 3 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||
| 5 | VM::EC2::Generic - Base class for VM::EC2 objects | ||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||
| 7 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||
| 9 | use VM::EC2; | ||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||
| 11 | my $ec2 = VM::EC2->new(-access_key => 'access key id', | ||||||||||||||||||||||||||||||||||||||||
| 12 | -secret_key => 'aws_secret_key', | ||||||||||||||||||||||||||||||||||||||||
| 13 | -endpoint => 'http://ec2.amazonaws.com'); | ||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||
| 15 | my $object = $ec2->some_method(...); | ||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||
| 17 | # getting data fields | ||||||||||||||||||||||||||||||||||||||||
| 18 | my @field_names = $object->fields; | ||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||
| 20 | # invoking data fields as methods | ||||||||||||||||||||||||||||||||||||||||
| 21 | my $request_id = $object->requestId; | ||||||||||||||||||||||||||||||||||||||||
| 22 | my $xmlns = $object->xmlns; | ||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||
| 24 | # tagging | ||||||||||||||||||||||||||||||||||||||||
| 25 | my $tags = $object->tags; | ||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||
| 27 | if ($tags->{Role} eq 'WebServer') { | ||||||||||||||||||||||||||||||||||||||||
| 28 | $object->delete_tags(Role=>undef); | ||||||||||||||||||||||||||||||||||||||||
| 29 | $object->add_tags(Role => 'Web Server', | ||||||||||||||||||||||||||||||||||||||||
| 30 | Status => 'development'); | ||||||||||||||||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||||||||
| 33 | # get the parsed XML object as a hash | ||||||||||||||||||||||||||||||||||||||||
| 34 | my $hashref = $object->payload; | ||||||||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||||||||
| 36 | # get the parsed XML object as a Data::Dumper string | ||||||||||||||||||||||||||||||||||||||||
| 37 | my $text = $object->as_string; | ||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||
| 39 | # get the VM::EC2 object back | ||||||||||||||||||||||||||||||||||||||||
| 40 | my $ec2 = $object->ec2; | ||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||
| 42 | # get the most recent error string | ||||||||||||||||||||||||||||||||||||||||
| 43 | warn $object->error_str; | ||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||
| 45 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||||||||||
| 47 | This is a common base class for objects returned from VM::EC2. It | ||||||||||||||||||||||||||||||||||||||||
| 48 | provides a number of generic methods that are used in subclasses, but | ||||||||||||||||||||||||||||||||||||||||
| 49 | is not intended to be used directly. | ||||||||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||||||||
| 51 | =head1 METHODS | ||||||||||||||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||||||||||||||
| 53 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||
| 55 | 7 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||
| 56 | 7 | ▶ | use Carp 'croak'; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||
| 57 | 7 | ▶ | use Data::Dumper; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||
| 58 | 7 | ▶ | use VM::EC2 'tag'; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||||
| 60 | 7 | our $AUTOLOAD; | |||||||||||||||||||||||||||||||||||||||
| 61 | 7 | $Data::Dumper::Terse++; | |||||||||||||||||||||||||||||||||||||||
| 62 | 7 | $Data::Dumper::Indent=1; | |||||||||||||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||||||||||||||
| 64 | use overload | ||||||||||||||||||||||||||||||||||||||||
| 65 | 0 | ▶ | '""' => sub {my $self = shift; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||
| 66 | 0 | return $self->short_name; | |||||||||||||||||||||||||||||||||||||||
| 67 | }, | ||||||||||||||||||||||||||||||||||||||||
| 68 | 7 | ▶ | fallback => 1; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||||||||||||||
| 70 | sub AUTOLOAD { | ||||||||||||||||||||||||||||||||||||||||
| 71 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
AUTOLOAD: not called CC=12 SCAR=50.5
| |||||||||||||||||||||||||||||||||||||||||
| 72 | 0 | my ($pack,$func_name) = $AUTOLOAD=~/(.+)::([^:]+)$/; | |||||||||||||||||||||||||||||||||||||||
| 73 | 0 | ▶ | return if $func_name eq 'DESTROY'; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 74 | 0 | my %fields = map {$_=>1} $self->valid_fields; | |||||||||||||||||||||||||||||||||||||||
| 75 | 0 | my $mixed = VM::EC2->uncanonicalize($func_name);# mixedCase | |||||||||||||||||||||||||||||||||||||||
| 76 | 0 | my $flat = VM::EC2->canonicalize($func_name); # underscore_style | |||||||||||||||||||||||||||||||||||||||
| 77 | 0 | $flat =~ s/^-//; | |||||||||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||||||||||
| 79 | 0 | ▶ | if ($mixed eq $flat) { | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 80 | 0 | ▶ | return $self->{data}{$mixed} if $fields{$mixed}; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 81 | 0 | ▶ | return $self->{data}{ucfirst $mixed} if $fields{ucfirst $mixed}; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 82 | 0 | croak "Can't locate object method \"$func_name\" via package \"$pack\""; | |||||||||||||||||||||||||||||||||||||||
| 83 | } | ||||||||||||||||||||||||||||||||||||||||
| 84 | |||||||||||||||||||||||||||||||||||||||||
| 85 | 0 | ▶ | if ($func_name eq $flat && $self->can($mixed)) { | ||||||||||||||||||||||||||||||||||||||
|
Branch: 4 branches
Condition0%0/3
$func_name eq $flat and $self->can($mixed)
MC/DC0%0/2
$func_name eq $flat and $self->can($mixed)
$func_name eq $flat
$self->can($mixed)
Truth table0%0/3
A and B
A= $func_name eq $flatB= $self->can($mixed)
| |||||||||||||||||||||||||||||||||||||||||
| 86 | 0 | return $self->$mixed(@_); | |||||||||||||||||||||||||||||||||||||||
| 87 | ▶ | } elsif ($func_name eq $mixed && $self->can($flat)) { | |||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$func_name eq $mixed and $self->can($flat)
MC/DC0%0/2
$func_name eq $mixed and $self->can($flat)
$func_name eq $mixed
$self->can($flat)
Truth table0%0/3
A and B
A= $func_name eq $mixedB= $self->can($flat)
| |||||||||||||||||||||||||||||||||||||||||
| 88 | 0 | return $self->$flat(@_); | |||||||||||||||||||||||||||||||||||||||
| 89 | } elsif ($fields{$mixed}) { | ||||||||||||||||||||||||||||||||||||||||
| 90 | 0 | ▶ | return $self->{data}{$mixed} if $fields{$mixed}; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 91 | } elsif ($fields{ucfirst($mixed)}) { | ||||||||||||||||||||||||||||||||||||||||
| 92 | # very occasionally an API field breaks Amazon's coding | ||||||||||||||||||||||||||||||||||||||||
| 93 | # conventions and starts with an uppercase | ||||||||||||||||||||||||||||||||||||||||
| 94 | 0 | return $self->{data}{ucfirst($mixed)}; | |||||||||||||||||||||||||||||||||||||||
| 95 | } else { | ||||||||||||||||||||||||||||||||||||||||
| 96 | 0 | croak "Can't locate object method \"$func_name\" via package \"$pack\""; | |||||||||||||||||||||||||||||||||||||||
| 97 | } | ||||||||||||||||||||||||||||||||||||||||
| 98 | } | ||||||||||||||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||||||||||||||
| 100 | sub can { | ||||||||||||||||||||||||||||||||||||||||
| 101 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
can: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||
| 102 | 0 | my $method = shift; | |||||||||||||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||||||||||||||
| 104 | 0 | my $can = $self->SUPER::can($method); | |||||||||||||||||||||||||||||||||||||||
| 105 | 0 | ▶ | return $can if $can; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||||||||||||||
| 107 | 0 | my %fields = map {$_=>1} $self->valid_fields; | |||||||||||||||||||||||||||||||||||||||
| 108 | 0 | ▶ | return \&AUTOLOAD if $fields{$method}; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||||||||||||||
| 110 | 0 | return; | |||||||||||||||||||||||||||||||||||||||
| 111 | } | ||||||||||||||||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||||||||||||||
| 113 | =head2 $object = VM::EC2::Generic->new($payload,$ec2 [,$xmlns, $requestId]) | ||||||||||||||||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||||||||||||||
| 115 | Given the parsed XML generated by VM::EC2::Dispatch and the VM::EC2 | ||||||||||||||||||||||||||||||||||||||||
| 116 | object, return a new object. Two optional additional arguments provide | ||||||||||||||||||||||||||||||||||||||||
| 117 | the seldom-needed XML namespace and ID of the request that generated | ||||||||||||||||||||||||||||||||||||||||
| 118 | this object. | ||||||||||||||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||||||||||||||
| 120 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||||||||||
| 122 | sub new { | ||||||||||||||||||||||||||||||||||||||||
| 123 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 124 | 0 | ▶ | @_ >= 2 or croak "Usage: $self->new(\$data,\$ec2)"; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 125 | 0 | my ($data,$ec2,$xmlns,$requestid) = @_; | |||||||||||||||||||||||||||||||||||||||
| 126 | 0 | ▶ | return bless {data => $data, | ||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
ref $self || $self
MC/DC0%0/2
ref $self || $self
ref $self
$self
Truth table0%0/3
A || B
A= ref $selfB= $self
| |||||||||||||||||||||||||||||||||||||||||
| 127 | aws => $ec2, | ||||||||||||||||||||||||||||||||||||||||
| 128 | xmlns => $xmlns, | ||||||||||||||||||||||||||||||||||||||||
| 129 | requestId => $requestid | ||||||||||||||||||||||||||||||||||||||||
| 130 | },ref $self || $self; | ||||||||||||||||||||||||||||||||||||||||
| 131 | } | ||||||||||||||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||||||||||||||
| 133 | =head2 $ec2 = $object->ec2 | ||||||||||||||||||||||||||||||||||||||||
| 134 | |||||||||||||||||||||||||||||||||||||||||
| 135 | =head2 $ec2 = $object->aws | ||||||||||||||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||||||||||||||
| 137 | Return the VM::EC2 object that generated this object. This method can | ||||||||||||||||||||||||||||||||||||||||
| 138 | be called as either ec2() (preferred) or aws() (deprecated). | ||||||||||||||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||||||||||||||
| 140 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||||||||||||||
| 142 | sub ec2 { | ||||||||||||||||||||||||||||||||||||||||
| 143 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
ec2: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 144 | 0 | my $d = $self->{aws}; | |||||||||||||||||||||||||||||||||||||||
| 145 | 0 | ▶ | $self->{aws} = shift if @_; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 146 | 0 | $d; | |||||||||||||||||||||||||||||||||||||||
| 147 | } | ||||||||||||||||||||||||||||||||||||||||
| 148 | |||||||||||||||||||||||||||||||||||||||||
| 149 | 0 | ▶ | sub aws {shift->ec2} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
aws: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 150 | |||||||||||||||||||||||||||||||||||||||||
| 151 | =head2 $id = $object->primary_id (optional method) | ||||||||||||||||||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||||||||||||||||
| 153 | Resources that have unique Amazon identifiers, such as images, | ||||||||||||||||||||||||||||||||||||||||
| 154 | instances and volumes, implement the primary_id() method to return | ||||||||||||||||||||||||||||||||||||||||
| 155 | that identifier. Resources that do not have unique identifiers, will | ||||||||||||||||||||||||||||||||||||||||
| 156 | throw an exception if this method is called. This method is in | ||||||||||||||||||||||||||||||||||||||||
| 157 | addition to the resource-specific ID. For example, volumes have a | ||||||||||||||||||||||||||||||||||||||||
| 158 | unique ID, and this ID can be fetched with either of: | ||||||||||||||||||||||||||||||||||||||||
| 159 | |||||||||||||||||||||||||||||||||||||||||
| 160 | $vol->volumeId; | ||||||||||||||||||||||||||||||||||||||||
| 161 | |||||||||||||||||||||||||||||||||||||||||
| 162 | or | ||||||||||||||||||||||||||||||||||||||||
| 163 | |||||||||||||||||||||||||||||||||||||||||
| 164 | $vol->primary_id; | ||||||||||||||||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||||||||||||||
| 166 | =back | ||||||||||||||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||||||||||||||
| 168 | =head2 $xmlns = $object->xmlns | ||||||||||||||||||||||||||||||||||||||||
| 169 | |||||||||||||||||||||||||||||||||||||||||
| 170 | Return the XML namespace of the request that generated this object, if | ||||||||||||||||||||||||||||||||||||||||
| 171 | any. All objects generated by direct requests on the VM::EC2 object | ||||||||||||||||||||||||||||||||||||||||
| 172 | will return this field, but objects returned via methods calls on | ||||||||||||||||||||||||||||||||||||||||
| 173 | these objects (objects once removed) may not. | ||||||||||||||||||||||||||||||||||||||||
| 174 | |||||||||||||||||||||||||||||||||||||||||
| 175 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 176 | |||||||||||||||||||||||||||||||||||||||||
| 177 | 0 | ▶ | sub xmlns { shift->{xmlns} } | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
xmlns: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 178 | |||||||||||||||||||||||||||||||||||||||||
| 179 | =head2 $id = $object->requestId | ||||||||||||||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||||||||||||||
| 181 | Return the ID of the reuqest that generated this object, if any. All | ||||||||||||||||||||||||||||||||||||||||
| 182 | objects generated by direct requests on the VM::EC2 object will return | ||||||||||||||||||||||||||||||||||||||||
| 183 | this field, but objects returned via methods calls on these objects | ||||||||||||||||||||||||||||||||||||||||
| 184 | (objects once removed) may not. | ||||||||||||||||||||||||||||||||||||||||
| 185 | |||||||||||||||||||||||||||||||||||||||||
| 186 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||||||||||||||
| 188 | 0 | ▶ | sub requestId { shift->{requestId} } | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
requestId: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||||||||||||||
| 190 | =head2 $name = $object->short_name | ||||||||||||||||||||||||||||||||||||||||
| 191 | |||||||||||||||||||||||||||||||||||||||||
| 192 | Return a short name for this object for use in string | ||||||||||||||||||||||||||||||||||||||||
| 193 | interpolation. If the object has a primary_id() method, then this | ||||||||||||||||||||||||||||||||||||||||
| 194 | returns that ID. Otherwise it returns the default Perl object name | ||||||||||||||||||||||||||||||||||||||||
| 195 | (VM::EC2::Generic=HASH(0x99f3850). Some classes override short_name() | ||||||||||||||||||||||||||||||||||||||||
| 196 | in order to customized information about the object. See for example | ||||||||||||||||||||||||||||||||||||||||
| 197 | L<VM::EC2::SecurityGroup::IpPermission>. | ||||||||||||||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||||||||||||||
| 199 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 200 | |||||||||||||||||||||||||||||||||||||||||
| 201 | sub short_name { | ||||||||||||||||||||||||||||||||||||||||
| 202 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
short_name: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 203 | 0 | ▶ | if ($self->can('primary_id')) { | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 204 | 0 | return $self->primary_id; | |||||||||||||||||||||||||||||||||||||||
| 205 | } else { | ||||||||||||||||||||||||||||||||||||||||
| 206 | 0 | return overload::StrVal($self); | |||||||||||||||||||||||||||||||||||||||
| 207 | } | ||||||||||||||||||||||||||||||||||||||||
| 208 | } | ||||||||||||||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||||||||||||||
| 210 | =head2 $hashref = $object->payload | ||||||||||||||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||||||||||||||
| 212 | Return the parsed XML hashref that underlies this object. See | ||||||||||||||||||||||||||||||||||||||||
| 213 | L<VM::EC2::Dispatch>. | ||||||||||||||||||||||||||||||||||||||||
| 214 | |||||||||||||||||||||||||||||||||||||||||
| 215 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 216 | |||||||||||||||||||||||||||||||||||||||||
| 217 | 0 | ▶ | sub payload { shift->{data} } | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
payload: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 218 | |||||||||||||||||||||||||||||||||||||||||
| 219 | |||||||||||||||||||||||||||||||||||||||||
| 220 | =head2 @fields = $object->fields | ||||||||||||||||||||||||||||||||||||||||
| 221 | |||||||||||||||||||||||||||||||||||||||||
| 222 | Return the data field names that are valid for an object of this | ||||||||||||||||||||||||||||||||||||||||
| 223 | type. These field names correspond to tags in the XML | ||||||||||||||||||||||||||||||||||||||||
| 224 | returned from Amazon and can then be used as method calls. | ||||||||||||||||||||||||||||||||||||||||
| 225 | |||||||||||||||||||||||||||||||||||||||||
| 226 | Internally, this method is called valid_fields() | ||||||||||||||||||||||||||||||||||||||||
| 227 | |||||||||||||||||||||||||||||||||||||||||
| 228 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 229 | |||||||||||||||||||||||||||||||||||||||||
| 230 | 0 | ▶ | sub fields { shift->valid_fields } | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
fields: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 231 | |||||||||||||||||||||||||||||||||||||||||
| 232 | sub valid_fields { | ||||||||||||||||||||||||||||||||||||||||
| 233 | 0 | ▶ | return qw(xmlns requestId) | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
valid_fields: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||
| 234 | } | ||||||||||||||||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||||||||||||||
| 236 | =head2 $text = $object->as_string | ||||||||||||||||||||||||||||||||||||||||
| 237 | |||||||||||||||||||||||||||||||||||||||||
| 238 | Return a Data::Dumper representation of the contents of this object's | ||||||||||||||||||||||||||||||||||||||||
| 239 | payload. | ||||||||||||||||||||||||||||||||||||||||
| 240 | |||||||||||||||||||||||||||||||||||||||||
| 241 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 242 | |||||||||||||||||||||||||||||||||||||||||
| 243 | sub as_string { | ||||||||||||||||||||||||||||||||||||||||
| 244 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
as_string: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 245 | 0 | return Dumper($self->{data}); | |||||||||||||||||||||||||||||||||||||||
| 246 | } | ||||||||||||||||||||||||||||||||||||||||
| 247 | |||||||||||||||||||||||||||||||||||||||||
| 248 | =head2 $hashref = $object->tags | ||||||||||||||||||||||||||||||||||||||||
| 249 | |||||||||||||||||||||||||||||||||||||||||
| 250 | =head2 $hashref = $object->tagSet | ||||||||||||||||||||||||||||||||||||||||
| 251 | |||||||||||||||||||||||||||||||||||||||||
| 252 | Return the metadata tags assigned to this resource, if any, as a | ||||||||||||||||||||||||||||||||||||||||
| 253 | hashref. Both tags() and tagSet() work identically. | ||||||||||||||||||||||||||||||||||||||||
| 254 | |||||||||||||||||||||||||||||||||||||||||
| 255 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 256 | |||||||||||||||||||||||||||||||||||||||||
| 257 | sub tags { | ||||||||||||||||||||||||||||||||||||||||
| 258 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
tags: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 259 | 0 | my $result = {}; | |||||||||||||||||||||||||||||||||||||||
| 260 | 0 | ▶ | my $set = $self->{data}{tagSet} or return $result; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 261 | 0 | ▶ | my $innerhash = $set->{item} or return $result; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 262 | 0 | for my $key (keys %$innerhash) { | |||||||||||||||||||||||||||||||||||||||
| 263 | 0 | $result->{$key} = $innerhash->{$key}{value}; | |||||||||||||||||||||||||||||||||||||||
| 264 | } | ||||||||||||||||||||||||||||||||||||||||
| 265 | 0 | return $result; | |||||||||||||||||||||||||||||||||||||||
| 266 | } | ||||||||||||||||||||||||||||||||||||||||
| 267 | |||||||||||||||||||||||||||||||||||||||||
| 268 | sub tagSet { | ||||||||||||||||||||||||||||||||||||||||
| 269 | 0 | ▶ | return shift->tags(); | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
tagSet: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 270 | } | ||||||||||||||||||||||||||||||||||||||||
| 271 | |||||||||||||||||||||||||||||||||||||||||
| 272 | |||||||||||||||||||||||||||||||||||||||||
| 273 | =head2 $boolean = $object->add_tags(Tag1=>'value1',Tag2=>'value2',...) | ||||||||||||||||||||||||||||||||||||||||
| 274 | |||||||||||||||||||||||||||||||||||||||||
| 275 | =head2 $boolean = $object->add_tags(\%hash) | ||||||||||||||||||||||||||||||||||||||||
| 276 | |||||||||||||||||||||||||||||||||||||||||
| 277 | Add one or more tags to the object. You may provide either a list of | ||||||||||||||||||||||||||||||||||||||||
| 278 | tag/value pairs or a hashref. If no tag of the indicated name exsists | ||||||||||||||||||||||||||||||||||||||||
| 279 | it will be created. If there is already a tag by this name, it will | ||||||||||||||||||||||||||||||||||||||||
| 280 | be set to the provided value. The result code is true if the Amazon | ||||||||||||||||||||||||||||||||||||||||
| 281 | resource was successfully updated. | ||||||||||||||||||||||||||||||||||||||||
| 282 | |||||||||||||||||||||||||||||||||||||||||
| 283 | Also see VM::EC2->add_tags() for a way of tagging multiple resources | ||||||||||||||||||||||||||||||||||||||||
| 284 | simultaneously. | ||||||||||||||||||||||||||||||||||||||||
| 285 | |||||||||||||||||||||||||||||||||||||||||
| 286 | The alias add_tag() is also provided as a convenience. | ||||||||||||||||||||||||||||||||||||||||
| 287 | |||||||||||||||||||||||||||||||||||||||||
| 288 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 289 | |||||||||||||||||||||||||||||||||||||||||
| 290 | sub add_tags { | ||||||||||||||||||||||||||||||||||||||||
| 291 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
add_tags: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 292 | 0 | ▶ | my $taglist = ref $_[0] && ref $_[0] eq 'HASH' ? shift : {@_}; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
ref $_[0] and ref $_[0] eq "HASH"
MC/DC0%0/2
ref $_[0] and ref $_[0] eq "HASH"
ref $_[0]
ref $_[0] eq "HASH"
Truth table0%0/3
A and B
A= ref $_[0]B= ref $_[0] eq "HASH"
| |||||||||||||||||||||||||||||||||||||||||
| 293 | 0 | ▶ | $self->can('primary_id') or croak "You cannot tag objects of type ",ref $self; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 294 | 0 | $self->aws->create_tags(-resource_id => $self->primary_id, | |||||||||||||||||||||||||||||||||||||||
| 295 | -tag => $taglist); | ||||||||||||||||||||||||||||||||||||||||
| 296 | } | ||||||||||||||||||||||||||||||||||||||||
| 297 | |||||||||||||||||||||||||||||||||||||||||
| 298 | 0 | ▶ | sub add_tag { shift->add_tags(@_) } | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
add_tag: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||
| 299 | |||||||||||||||||||||||||||||||||||||||||
| 300 | =head2 $boolean = $object->delete_tags(@args) | ||||||||||||||||||||||||||||||||||||||||
| 301 | |||||||||||||||||||||||||||||||||||||||||
| 302 | Delete the indicated tags from the indicated resource. There are | ||||||||||||||||||||||||||||||||||||||||
| 303 | several variants you may use: | ||||||||||||||||||||||||||||||||||||||||
| 304 | |||||||||||||||||||||||||||||||||||||||||
| 305 | # delete Foo tag if it has value "bar" and Buzz tag if it has value 'bazz' | ||||||||||||||||||||||||||||||||||||||||
| 306 | $i->delete_tags({Foo=>'bar',Buzz=>'bazz'}) | ||||||||||||||||||||||||||||||||||||||||
| 307 | |||||||||||||||||||||||||||||||||||||||||
| 308 | # same as above but using a list rather than a hashref | ||||||||||||||||||||||||||||||||||||||||
| 309 | $i->delete_tags(Foo=>'bar',Buzz=>'bazz') | ||||||||||||||||||||||||||||||||||||||||
| 310 | |||||||||||||||||||||||||||||||||||||||||
| 311 | # delete Foo tag if it has any value, Buzz if it has value 'bazz' | ||||||||||||||||||||||||||||||||||||||||
| 312 | $i->delete_tags({Foo=>undef,Buzz=>'bazz'}) | ||||||||||||||||||||||||||||||||||||||||
| 313 | |||||||||||||||||||||||||||||||||||||||||
| 314 | # delete Foo and Buzz tags unconditionally | ||||||||||||||||||||||||||||||||||||||||
| 315 | $i->delete_tags(['Foo','Buzz']) | ||||||||||||||||||||||||||||||||||||||||
| 316 | |||||||||||||||||||||||||||||||||||||||||
| 317 | # delete Foo tag unconditionally | ||||||||||||||||||||||||||||||||||||||||
| 318 | $i->delete_tags('Foo'); | ||||||||||||||||||||||||||||||||||||||||
| 319 | |||||||||||||||||||||||||||||||||||||||||
| 320 | Also see VM::EC2->delete_tags() for a way of deleting tags from multiple | ||||||||||||||||||||||||||||||||||||||||
| 321 | resources simultaneously. | ||||||||||||||||||||||||||||||||||||||||
| 322 | |||||||||||||||||||||||||||||||||||||||||
| 323 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 324 | |||||||||||||||||||||||||||||||||||||||||
| 325 | sub delete_tags { | ||||||||||||||||||||||||||||||||||||||||
| 326 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
delete_tags: not called CC=6 SCAR=37.4
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 327 | 0 | my $taglist; | |||||||||||||||||||||||||||||||||||||||
| 328 | |||||||||||||||||||||||||||||||||||||||||
| 329 | 0 | ▶ | if (ref $_[0]) { | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 330 | 0 | ▶ | if (ref $_[0] eq 'HASH') { | ||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||
| 331 | 0 | $taglist = shift; | |||||||||||||||||||||||||||||||||||||||
| 332 | } elsif (ref $_[0] eq 'ARRAY') { | ||||||||||||||||||||||||||||||||||||||||
| 333 | 0 | $taglist = {map {$_=>undef} @{$_[0]} }; | |||||||||||||||||||||||||||||||||||||||
| 334 | } | ||||||||||||||||||||||||||||||||||||||||
| 335 | } else { | ||||||||||||||||||||||||||||||||||||||||
| 336 | 0 | ▶ | if (@_ == 1) { | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 337 | 0 | $taglist = {shift()=>undef}; | |||||||||||||||||||||||||||||||||||||||
| 338 | } else { | ||||||||||||||||||||||||||||||||||||||||
| 339 | 0 | $taglist = {@_}; | |||||||||||||||||||||||||||||||||||||||
| 340 | } | ||||||||||||||||||||||||||||||||||||||||
| 341 | } | ||||||||||||||||||||||||||||||||||||||||
| 342 | |||||||||||||||||||||||||||||||||||||||||
| 343 | 0 | ▶ | $self->can('primary_id') or croak "You cannot delete tags from objects of type ",ref $self; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 344 | 0 | $self->aws->delete_tags(-resource_id => $self->primary_id, | |||||||||||||||||||||||||||||||||||||||
| 345 | -tag => $taglist); | ||||||||||||||||||||||||||||||||||||||||
| 346 | } | ||||||||||||||||||||||||||||||||||||||||
| 347 | |||||||||||||||||||||||||||||||||||||||||
| 348 | sub _object_args { | ||||||||||||||||||||||||||||||||||||||||
| 349 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
_object_args: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||
| 350 | 0 | return ($self->aws,$self->xmlns,$self->requestId); | |||||||||||||||||||||||||||||||||||||||
| 351 | } | ||||||||||||||||||||||||||||||||||||||||
| 352 | |||||||||||||||||||||||||||||||||||||||||
| 353 | =head2 $xml = $object->as_xml | ||||||||||||||||||||||||||||||||||||||||
| 354 | |||||||||||||||||||||||||||||||||||||||||
| 355 | Returns an XML version of the object. The object will already been | ||||||||||||||||||||||||||||||||||||||||
| 356 | parsed by XML::Simple at this point, and so the data returned by this | ||||||||||||||||||||||||||||||||||||||||
| 357 | method will not be identical to the XML returned by AWS. | ||||||||||||||||||||||||||||||||||||||||
| 358 | |||||||||||||||||||||||||||||||||||||||||
| 359 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 360 | |||||||||||||||||||||||||||||||||||||||||
| 361 | sub as_xml { | ||||||||||||||||||||||||||||||||||||||||
| 362 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
as_xml: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 363 | 0 | XML::Simple->new->XMLout($self->payload, | |||||||||||||||||||||||||||||||||||||||
| 364 | NoAttr => 1, | ||||||||||||||||||||||||||||||||||||||||
| 365 | KeyAttr => ['key'], | ||||||||||||||||||||||||||||||||||||||||
| 366 | RootName => 'xml', | ||||||||||||||||||||||||||||||||||||||||
| 367 | ); | ||||||||||||||||||||||||||||||||||||||||
| 368 | } | ||||||||||||||||||||||||||||||||||||||||
| 369 | |||||||||||||||||||||||||||||||||||||||||
| 370 | =head2 $value = $object->attribute('tag_name') | ||||||||||||||||||||||||||||||||||||||||
| 371 | |||||||||||||||||||||||||||||||||||||||||
| 372 | Returns the value of a tag in the XML returned from AWS, using a | ||||||||||||||||||||||||||||||||||||||||
| 373 | simple heuristic. If the requested tag has a nested tag named <value> | ||||||||||||||||||||||||||||||||||||||||
| 374 | it will return the contents of <value>. If the tag has one or more | ||||||||||||||||||||||||||||||||||||||||
| 375 | nested tags named <item>, it will return a list of hashrefs located | ||||||||||||||||||||||||||||||||||||||||
| 376 | within the <item> tag. Otherwise it will return the contents of | ||||||||||||||||||||||||||||||||||||||||
| 377 | <tag_name>. | ||||||||||||||||||||||||||||||||||||||||
| 378 | |||||||||||||||||||||||||||||||||||||||||
| 379 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 380 | |||||||||||||||||||||||||||||||||||||||||
| 381 | sub attribute { | ||||||||||||||||||||||||||||||||||||||||
| 382 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
attribute: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 383 | 0 | my $attr = shift; | |||||||||||||||||||||||||||||||||||||||
| 384 | 0 | ▶ | my $payload = $self->payload or return; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 385 | 0 | ▶ | my $hr = $payload->{$attr} or return; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 386 | 0 | ▶ | return $hr->{value} if $hr->{value}; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 387 | 0 | ▶ | return @{$hr->{item}} if $hr->{item}; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 388 | 0 | return $hr; | |||||||||||||||||||||||||||||||||||||||
| 389 | } | ||||||||||||||||||||||||||||||||||||||||
| 390 | |||||||||||||||||||||||||||||||||||||||||
| 391 | =head2 $string = $object->error_str | ||||||||||||||||||||||||||||||||||||||||
| 392 | |||||||||||||||||||||||||||||||||||||||||
| 393 | Returns the error string for the last operation, if any, as reported | ||||||||||||||||||||||||||||||||||||||||
| 394 | by VM::EC2. | ||||||||||||||||||||||||||||||||||||||||
| 395 | |||||||||||||||||||||||||||||||||||||||||
| 396 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 397 | |||||||||||||||||||||||||||||||||||||||||
| 398 | sub error_str { | ||||||||||||||||||||||||||||||||||||||||
| 399 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
error_str: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 400 | 0 | ▶ | my $ec2 = $self->ec2 or return; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 401 | 0 | $ec2->error_str; | |||||||||||||||||||||||||||||||||||||||
| 402 | } | ||||||||||||||||||||||||||||||||||||||||
| 403 | |||||||||||||||||||||||||||||||||||||||||
| 404 | =head2 $string = $object->error | ||||||||||||||||||||||||||||||||||||||||
| 405 | |||||||||||||||||||||||||||||||||||||||||
| 406 | Returns the L<VM::EC2::Error> object from the last operation, if any, | ||||||||||||||||||||||||||||||||||||||||
| 407 | as reported by VM::EC2. | ||||||||||||||||||||||||||||||||||||||||
| 408 | |||||||||||||||||||||||||||||||||||||||||
| 409 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 410 | |||||||||||||||||||||||||||||||||||||||||
| 411 | sub error { | ||||||||||||||||||||||||||||||||||||||||
| 412 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
error: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 413 | 0 | ▶ | my $ec2 = $self->ec2 or return; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 414 | 0 | $ec2->error; | |||||||||||||||||||||||||||||||||||||||
| 415 | } | ||||||||||||||||||||||||||||||||||||||||
| 416 | |||||||||||||||||||||||||||||||||||||||||
| 417 | =head1 STRING OVERLOADING | ||||||||||||||||||||||||||||||||||||||||
| 418 | |||||||||||||||||||||||||||||||||||||||||
| 419 | This base class and its subclasses use string overloading so that the | ||||||||||||||||||||||||||||||||||||||||
| 420 | object looks and acts like a simple string when used in a string | ||||||||||||||||||||||||||||||||||||||||
| 421 | context (such as when printed or combined with other | ||||||||||||||||||||||||||||||||||||||||
| 422 | strings). Typically the string corresponds to the Amazon resource ID | ||||||||||||||||||||||||||||||||||||||||
| 423 | such as "ami-12345" and is generated by the short_name() method. | ||||||||||||||||||||||||||||||||||||||||
| 424 | |||||||||||||||||||||||||||||||||||||||||
| 425 | You can sort and compare the objects as if they were strings, but | ||||||||||||||||||||||||||||||||||||||||
| 426 | despite this, object method calls work in the usual way. | ||||||||||||||||||||||||||||||||||||||||
| 427 | |||||||||||||||||||||||||||||||||||||||||
| 428 | =head1 SEE ALSO | ||||||||||||||||||||||||||||||||||||||||
| 429 | |||||||||||||||||||||||||||||||||||||||||
| 430 | L<VM::EC2> | ||||||||||||||||||||||||||||||||||||||||
| 431 | L<VM::EC2::Dispatch> | ||||||||||||||||||||||||||||||||||||||||
| 432 | L<VM::EC2::Generic> | ||||||||||||||||||||||||||||||||||||||||
| 433 | L<VM::EC2::BlockDevice> | ||||||||||||||||||||||||||||||||||||||||
| 434 | L<VM::EC2::BlockDevice::Attachment> | ||||||||||||||||||||||||||||||||||||||||
| 435 | L<VM::EC2::BlockDevice::Mapping> | ||||||||||||||||||||||||||||||||||||||||
| 436 | L<VM::EC2::BlockDevice::Mapping::EBS> | ||||||||||||||||||||||||||||||||||||||||
| 437 | L<VM::EC2::ConsoleOutput> | ||||||||||||||||||||||||||||||||||||||||
| 438 | L<VM::EC2::Error> | ||||||||||||||||||||||||||||||||||||||||
| 439 | L<VM::EC2::Generic> | ||||||||||||||||||||||||||||||||||||||||
| 440 | L<VM::EC2::Group> | ||||||||||||||||||||||||||||||||||||||||
| 441 | L<VM::EC2::Image> | ||||||||||||||||||||||||||||||||||||||||
| 442 | L<VM::EC2::Instance> | ||||||||||||||||||||||||||||||||||||||||
| 443 | L<VM::EC2::Instance::Set> | ||||||||||||||||||||||||||||||||||||||||
| 444 | L<VM::EC2::Instance::State> | ||||||||||||||||||||||||||||||||||||||||
| 445 | L<VM::EC2::Instance::State::Change> | ||||||||||||||||||||||||||||||||||||||||
| 446 | L<VM::EC2::Instance::State::Reason> | ||||||||||||||||||||||||||||||||||||||||
| 447 | L<VM::EC2::Region> | ||||||||||||||||||||||||||||||||||||||||
| 448 | L<VM::EC2::ReservationSet> | ||||||||||||||||||||||||||||||||||||||||
| 449 | L<VM::EC2::SecurityGroup> | ||||||||||||||||||||||||||||||||||||||||
| 450 | L<VM::EC2::Snapshot> | ||||||||||||||||||||||||||||||||||||||||
| 451 | L<VM::EC2::Tag> | ||||||||||||||||||||||||||||||||||||||||
| 452 | L<VM::EC2::Volume> | ||||||||||||||||||||||||||||||||||||||||
| 453 | |||||||||||||||||||||||||||||||||||||||||
| 454 | =head1 AUTHOR | ||||||||||||||||||||||||||||||||||||||||
| 455 | |||||||||||||||||||||||||||||||||||||||||
| 456 | Lincoln Stein E<lt>lincoln.stein@gmail.comE<gt>. | ||||||||||||||||||||||||||||||||||||||||
| 457 | |||||||||||||||||||||||||||||||||||||||||
| 458 | Copyright (c) 2011 Ontario Institute for Cancer Research | ||||||||||||||||||||||||||||||||||||||||
| 459 | |||||||||||||||||||||||||||||||||||||||||
| 460 | This package and its accompanying libraries is free software; you can | ||||||||||||||||||||||||||||||||||||||||
| 461 | redistribute it and/or modify it under the terms of the GPL (either | ||||||||||||||||||||||||||||||||||||||||
| 462 | version 1, or at your option, any later version) or the Artistic | ||||||||||||||||||||||||||||||||||||||||
| 463 | License 2.0. Refer to LICENSE for the full license text. In addition, | ||||||||||||||||||||||||||||||||||||||||
| 464 | please see DISCLAIMER.txt for disclaimers of warranty. | ||||||||||||||||||||||||||||||||||||||||
| 465 | |||||||||||||||||||||||||||||||||||||||||
| 466 | =cut | ||||||||||||||||||||||||||||||||||||||||
| 467 | |||||||||||||||||||||||||||||||||||||||||
| 468 | 7 | 1; | |||||||||||||||||||||||||||||||||||||||
| 469 | |||||||||||||||||||||||||||||||||||||||||