Branch Coverage

blib/lib/Net/Amazon/EC2.pm
Criterion Covered Total %
branch 19 630 3.0


line true false branch
254 0 0 if ($res->code == 200)
260 0 0 if ($res->code == 200)
263 0 0 if /Code/ and not /Success/
264 0 0 if (/.*"([^"]+)"\s+:\s+"([^"]+)",/)
268 0 0 if keys %{$retval;}
277 0 3 if ($self->signature_version == 2) { }
3 0 elsif ($self->signature_version == 4) { }
302 0 0 if ($self->has_temp_creds or $self->has_SecurityToken)
353 0 3 if ($self->has_temp_creds or $self->has_SecurityToken)
426 3 0 if ($res->code >= 500) { }
446 1 2 if $self->debug == 1
477 1 2 if ($self->return_errors)
482 1 1 if ($self->debug) { }
493 15 0 if defined $_
5 10 if (grep {length $_ if defined $_;} $self->debug and $self->debug == 1)
501 3 12 $hex ? :
509 3 0 unless $filters and ref $filters eq 'ARRAY'
511 0 0 unless ref $filters->[0] eq 'ARRAY'
532 0 0 if defined $value
551 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
572 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
614 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
618 0 0 if ($xml->{'return'} eq 'true') { }
661 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
744 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
748 0 0 if ($xml->{'return'} eq 'true') { }
815 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
863 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
916 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
991 0 0 if (my $bdm = delete $args{'BlockDeviceMapping'})
997 0 0 if ($block_device =~ /^ephemeral[0-9]+$/) { }
0 0 elsif ($block_device eq 'none') { }
1011 0 0 unless $bde
1022 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1054 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1098 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1102 0 0 if ($xml->{'return'} eq 'true') { }
1141 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1145 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $xml->{'progress'} and ref $xml->{'progress'} ne 'HASH')
1191 0 0 if (ref $args{'ResourceId'} eq 'ARRAY') { }
1199 0 0 if (ref $args{'Tags'} eq 'HASH')
1203 0 0 if $count > 10
1212 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1216 0 0 if ($xml->{'return'} eq 'true') { }
1284 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1289 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $xml->{'snapshotId'} and ref $xml->{'snapshotId'} ne 'HASH')
1333 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1337 0 0 if ($xml->{'return'} eq 'true') { }
1371 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1375 0 0 if ($xml->{'return'} eq 'true') { }
1408 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1412 0 0 if ($xml->{'return'} eq 'true') { }
1446 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1450 0 0 if ($xml->{'return'} eq 'true') { }
1492 0 0 if (ref $args{'Tag.Key'} eq 'ARRAY')
1498 0 0 if (ref $args{'Tag.Value'} eq 'ARRAY')
1505 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1509 0 0 if ($xml->{'return'} eq 'true') { }
1544 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1548 0 0 if ($xml->{'return'} eq 'true') { }
1580 0 0 if (ref $args{'PublicIp'} eq 'ARRAY')
1588 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1593 0 0 if (ref $addy->{'instanceId'} eq 'HASH')
1632 0 0 if (ref $args{'ZoneName'} eq 'ARRAY')
1639 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1693 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1776 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1784 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'launchPermission'}{'item'})
1795 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'productCodes'}{'item'})
1805 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'blockDeviceMapping'}{'item'})
1863 0 0 if (ref $args{'ImageId'} eq 'ARRAY')
1869 0 0 if (ref $args{'Owner'} eq 'ARRAY')
1875 0 0 if (ref $args{'ExecutableBy'} eq 'ARRAY')
1882 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1893 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $item->{'stateReason'})
1900 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $item->{'blockDeviceMapping'})
1906 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $bdm->{'ebs'})
1924 0 0 if ref $item->{'description'}
1928 0 0 if (ref $tag_arr->{'value'} eq 'HASH')
1959 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $item->{'productCodes'})
2006 0 3 if (ref $args{'InstanceId'} eq 'ARRAY')
2015 3 0 if defined $_
3 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2041 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instance_elem->{'productCodes'})
2048 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instance_elem->{'networkInterfaceSet'})
2060 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $interface->{'groupSet'})
2077 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instance_elem->{'blockDeviceMapping'})
2094 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instance_elem->{'stateReason'})
2101 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $instance_elem->{'reason'} and ref $instance_elem->{'reason'} ne 'HASH')
2105 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $instance_elem->{'privateDnsName'} and ref $instance_elem->{'privateDnsName'} ne 'HASH')
2109 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $instance_elem->{'dnsName'} and ref $instance_elem->{'dnsName'} ne 'HASH')
2113 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $instance_elem->{'placement'}{'availabilityZone'} and ref $instance_elem->{'placement'}{'availabilityZone'} ne 'HASH')
2121 0 0 if (ref $tag_arr->{'value'} eq 'HASH')
2160 0 0 if ($product_codes)
2219 0 0 if (ref $args{'InstanceId'} eq 'ARRAY')
2234 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2244 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'nextToken'})
2250 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $tmp_xml->{'Errors'}) { }
2259 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $tmp_xml->{'nextToken'}) { }
2304 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $events_arr->{'notAfter'}) { }
2323 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instancestatus_elem->{'instanceStatus'})
2344 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instancestatus_elem->{'systemStatus'})
2429 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2437 0 0 if ($args{'Attribute'} eq 'instanceType') { }
0 0 elsif ($args{'Attribute'} eq 'kernel') { }
0 0 elsif ($args{'Attribute'} eq 'ramdisk') { }
0 0 elsif ($args{'Attribute'} eq 'userData') { }
0 0 elsif ($args{'Attribute'} eq 'disableApiTermination') { }
0 0 elsif ($args{'Attribute'} eq 'ebsOptimized') { }
0 0 elsif ($args{'Attribute'} eq 'instanceInitiatedShutdownBehavior') { }
0 0 elsif ($args{'Attribute'} eq 'rootDeviceName') { }
0 0 elsif ($args{'Attribute'} eq 'sourceDestCheck') { }
0 0 elsif ($args{'Attribute'} eq 'blockDeviceMapping') { }
2542 0 0 if (ref $args{'KeyName'} eq 'ARRAY')
2549 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2591 0 0 if (ref $args{'RegionName'} eq 'ARRAY')
2598 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2640 0 0 if (ref $args{'ReservedInstancesId'} eq 'ARRAY')
2647 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2717 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2772 0 0 if (ref $args{'GroupName'} eq 'ARRAY')
2778 0 0 if (ref $args{'GroupId'} eq 'ARRAY')
2785 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2808 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $ip_perm->{'groups'}{'item'})
2819 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $ip_perm->{'ipRanges'}{'item'})
2839 0 0 if ($ip_ranges)
2843 0 0 if ($groups)
2858 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $ip_perm->{'groups'}{'item'})
2869 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $ip_perm->{'ipRanges'}{'item'})
2889 0 0 if ($ip_ranges)
2893 0 0 if ($groups)
2957 0 0 if (ref $args{'SnapshotId'} eq 'ARRAY')
2964 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2970 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $xml->{'createVolumePermission'} and ref $xml->{'createVolumePermission'} ne 'HASH')
3037 0 0 if (ref $args{'SnapshotId'} eq 'ARRAY')
3044 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3051 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $snap->{'description'} and ref $snap->{'description'} ne 'HASH')
3055 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $snap->{'progress'} and ref $snap->{'progress'} ne 'HASH')
3061 0 0 if (ref $tag_arr->{'value'} eq 'HASH')
3115 0 0 if (ref $args{'VolumeId'} eq 'ARRAY')
3123 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3131 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $volume_set->{'snapshotId'} and ref $volume_set->{'snapshotId'} ne 'HASH')
3150 0 0 if (ref $tag_arr->{'value'} eq 'HASH')
3216 0 0 if (ref $args{'SubnetId'} eq 'ARRAY')
3224 0 0 if (ref $args{'Filter.Name'} eq 'ARRAY')
3232 0 0 if (ref $args{'Filter.Value'} eq 'ARRAY')
3243 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3253 0 0 if (ref $tag_arr->{'value'} eq 'HASH')
3308 0 0 if (ref $args{'Filter.Name'} eq 'ARRAY')
3312 0 0 if (ref $args{'Filter.Value'} eq 'ARRAY')
3319 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3385 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3430 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3434 0 0 if ($xml->{'return'} eq 'true') { }
3470 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3474 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'output'}) { }
3512 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3576 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3580 0 0 if ($xml->{'return'} eq 'true') { }
3656 0 0 if (ref $args{'Value'} eq 'HASH')
3664 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3668 0 0 if ($xml->{'return'} eq 'true') { }
3724 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3728 0 0 if ($xml->{'return'} eq 'true') { }
3760 0 0 if (ref $args{'InstanceId'} eq 'ARRAY')
3767 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3819 0 0 if (ref $args{'ReservedInstancesOfferingId'} eq 'ARRAY')
3825 0 0 if (ref $args{'InstanceCount'} eq 'ARRAY')
3832 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3836 0 0 if ($xml->{'reservedInstancesId'}) { }
3868 0 0 if (ref $args{'InstanceId'} eq 'ARRAY')
3875 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3879 0 0 if ($xml->{'return'} eq 'true') { }
3961 0 0 if (ref $args{'BlockDeviceMapping'} eq 'ARRAY')
3965 0 0 if $block_device->{'deviceName'}
3966 0 0 if $block_device->{'virtualName'}
3967 0 0 if $block_device->{'noDevice'}
3968 0 0 if $block_device->{'ebs'}{'snapshotId'}
3969 0 0 if $block_device->{'ebs'}{'volumeSize'}
3970 0 0 if $block_device->{'ebs'}{'deleteOnTermination'}
3977 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4009 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4013 0 0 if ($xml->{'return'} eq 'true') { }
4030 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4034 0 0 if ($xml->{'return'} eq 'true') { }
4073 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4077 0 0 if ($xml->{'return'} eq 'true') { }
4123 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4127 0 0 if ($xml->{'return'} eq 'true') { }
4168 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4172 0 0 if ($xml->{'return'} eq 'true') { }
4247 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4251 0 0 if ($xml->{'return'} eq 'true') { }
4489 0 0 if (ref $args{'SecurityGroup'} eq 'ARRAY')
4495 0 0 if (ref $args{'SecurityGroupId'} eq 'ARRAY')
4501 0 0 if (ref $args{'BlockDeviceMapping.VirtualName'} eq 'ARRAY')
4507 0 0 if (ref $args{'BlockDeviceMapping.DeviceName'} eq 'ARRAY')
4513 0 0 if (ref $args{'BlockDeviceMapping.Ebs.SnapshotId'} eq 'ARRAY')
4519 0 0 if (ref $args{'BlockDeviceMapping.Ebs.VolumeSize'} eq 'ARRAY')
4525 0 0 if (ref $args{'BlockDeviceMapping.Ebs.VolumeType'} eq 'ARRAY')
4531 0 0 if (ref $args{'BlockDeviceMapping.Ebs.DeleteOnTermination'} eq 'ARRAY')
4538 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4562 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instance_elem->{'productCodes'})
4569 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $instance_elem->{'reason'} and ref $instance_elem->{'reason'} ne 'HASH')
4573 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $instance_elem->{'privateDnsName'} and ref $instance_elem->{'privateDnsName'} ne 'HASH')
4577 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $instance_elem->{'dnsName'} and ref $instance_elem->{'dnsName'} ne 'HASH')
4581 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instance_elem->{'stateReason'})
4588 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instance_elem->{'blockDeviceMapping'})
4634 0 0 if ($product_codes)
4675 0 0 if (ref $args{'InstanceId'} eq 'ARRAY')
4681 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4743 0 0 if (ref $args{'InstanceId'} eq 'ARRAY')
4749 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4802 0 0 if (ref $args{'InstanceId'} eq 'ARRAY')
4808 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4865 0 0 if (ref $args{'InstanceId'} eq 'ARRAY')
4872 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }