Branch Coverage

blib/lib/Net/Amazon/EC2.pm
Criterion Covered Total %
branch 16 634 2.5


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 3 0 if ($self->signature_version == 2) { }
0 0 elsif ($self->signature_version == 4) { }
302 0 3 if ($self->has_temp_creds or $self->has_SecurityToken)
353 0 0 if ($self->has_temp_creds)
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 9 0 if defined $_
3 6 if (grep {length $_ if defined $_;} $self->debug and $self->debug == 1)
501 0 0 $hex ? :
509 3 0 unless $filters and ref $filters eq 'ARRAY'
511 0 0 unless ref $filters->[0] eq 'ARRAY'
536 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
557 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
599 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
603 0 0 if ($xml->{'return'} eq 'true') { }
646 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
729 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
733 0 0 if ($xml->{'return'} eq 'true') { }
800 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
848 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
901 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
976 0 0 if (my $bdm = delete $args{'BlockDeviceMapping'})
982 0 0 if ($block_device =~ /^ephemeral[0-9]+$/) { }
0 0 elsif ($block_device eq 'none') { }
996 0 0 unless $bde
1007 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1039 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1083 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1087 0 0 if ($xml->{'return'} eq 'true') { }
1126 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1130 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $xml->{'progress'} and ref $xml->{'progress'} ne 'HASH')
1176 0 0 if (ref $args{'ResourceId'} eq 'ARRAY') { }
1188 0 0 if (ref $args{'Tags'} eq 'HASH')
1192 0 0 if $count > 10
1201 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1205 0 0 if ($xml->{'return'} eq 'true') { }
1273 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1278 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $xml->{'snapshotId'} and ref $xml->{'snapshotId'} ne 'HASH')
1322 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1326 0 0 if ($xml->{'return'} eq 'true') { }
1360 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1364 0 0 if ($xml->{'return'} eq 'true') { }
1397 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1401 0 0 if ($xml->{'return'} eq 'true') { }
1435 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1439 0 0 if ($xml->{'return'} eq 'true') { }
1481 0 0 if (ref $args{'Tag.Key'} eq 'ARRAY')
1491 0 0 if (ref $args{'Tag.Value'} eq 'ARRAY')
1502 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1506 0 0 if ($xml->{'return'} eq 'true') { }
1541 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1545 0 0 if ($xml->{'return'} eq 'true') { }
1577 0 0 if (ref $args{'PublicIp'} eq 'ARRAY')
1589 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1594 0 0 if (ref $addy->{'instanceId'} eq 'HASH')
1633 0 0 if (ref $args{'ZoneName'} eq 'ARRAY')
1644 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1698 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1781 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1789 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'launchPermission'}{'item'})
1800 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'productCodes'}{'item'})
1810 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'blockDeviceMapping'}{'item'})
1868 0 0 if (ref $args{'ImageId'} eq 'ARRAY')
1878 0 0 if (ref $args{'Owner'} eq 'ARRAY')
1888 0 0 if (ref $args{'ExecutableBy'} eq 'ARRAY')
1899 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
1910 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $item->{'stateReason'})
1917 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $item->{'blockDeviceMapping'})
1923 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $bdm->{'ebs'})
1941 0 0 if ref $item->{'description'}
1945 0 0 if (ref $tag_arr->{'value'} eq 'HASH')
1976 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $item->{'productCodes'})
2023 0 3 if (ref $args{'InstanceId'} eq 'ARRAY')
2036 3 0 if defined $_
3 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2062 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instance_elem->{'productCodes'})
2069 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instance_elem->{'networkInterfaceSet'})
2081 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $interface->{'groupSet'})
2098 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instance_elem->{'blockDeviceMapping'})
2115 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instance_elem->{'stateReason'})
2122 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $instance_elem->{'reason'} and ref $instance_elem->{'reason'} ne 'HASH')
2126 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $instance_elem->{'privateDnsName'} and ref $instance_elem->{'privateDnsName'} ne 'HASH')
2130 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $instance_elem->{'dnsName'} and ref $instance_elem->{'dnsName'} ne 'HASH')
2134 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $instance_elem->{'placement'}{'availabilityZone'} and ref $instance_elem->{'placement'}{'availabilityZone'} ne 'HASH')
2142 0 0 if (ref $tag_arr->{'value'} eq 'HASH')
2181 0 0 if ($product_codes)
2239 0 0 if (ref $args{'InstanceId'} eq 'ARRAY')
2254 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2264 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'nextToken'})
2270 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $tmp_xml->{'Errors'}) { }
2279 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $tmp_xml->{'nextToken'}) { }
2324 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $events_arr->{'notAfter'}) { }
2343 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instancestatus_elem->{'instanceStatus'})
2364 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instancestatus_elem->{'systemStatus'})
2445 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2453 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 'instanceInitiatedShutdownBehavior') { }
0 0 elsif ($args{'Attribute'} eq 'rootDeviceName') { }
0 0 elsif ($args{'Attribute'} eq 'blockDeviceMapping') { }
2546 0 0 if (ref $args{'KeyName'} eq 'ARRAY')
2557 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2599 0 0 if (ref $args{'RegionName'} eq 'ARRAY')
2610 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2652 0 0 if (ref $args{'ReservedInstancesId'} eq 'ARRAY')
2663 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2733 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2788 0 0 if (ref $args{'GroupName'} eq 'ARRAY')
2797 0 0 if (ref $args{'GroupId'} eq 'ARRAY')
2807 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2830 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $ip_perm->{'groups'}{'item'})
2841 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $ip_perm->{'ipRanges'}{'item'})
2861 0 0 if ($ip_ranges)
2865 0 0 if ($groups)
2880 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $ip_perm->{'groups'}{'item'})
2891 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $ip_perm->{'ipRanges'}{'item'})
2911 0 0 if ($ip_ranges)
2915 0 0 if ($groups)
2979 0 0 if (ref $args{'SnapshotId'} eq 'ARRAY')
2990 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
2996 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $xml->{'createVolumePermission'} and ref $xml->{'createVolumePermission'} ne 'HASH')
3063 0 0 if (ref $args{'SnapshotId'} eq 'ARRAY')
3074 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3081 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $snap->{'description'} and ref $snap->{'description'} ne 'HASH')
3085 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $snap->{'progress'} and ref $snap->{'progress'} ne 'HASH')
3091 0 0 if (ref $tag_arr->{'value'} eq 'HASH')
3145 0 0 if (ref $args{'VolumeId'} eq 'ARRAY')
3157 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3165 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $volume_set->{'snapshotId'} and ref $volume_set->{'snapshotId'} ne 'HASH')
3184 0 0 if (ref $tag_arr->{'value'} eq 'HASH')
3250 0 0 if (ref $args{'SubnetId'} eq 'ARRAY')
3258 0 0 if (ref $args{'Filter.Name'} eq 'ARRAY')
3266 0 0 if (ref $args{'Filter.Value'} eq 'ARRAY')
3277 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3287 0 0 if (ref $tag_arr->{'value'} eq 'HASH')
3342 0 0 if (ref $args{'Filter.Name'} eq 'ARRAY')
3350 0 0 if (ref $args{'Filter.Value'} eq 'ARRAY')
3361 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3427 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3467 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3471 0 0 if ($xml->{'return'} eq 'true') { }
3507 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3511 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'output'}) { }
3549 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3613 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3617 0 0 if ($xml->{'return'} eq 'true') { }
3693 0 0 if (ref $args{'Value'} eq 'HASH')
3701 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3705 0 0 if ($xml->{'return'} eq 'true') { }
3761 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3765 0 0 if ($xml->{'return'} eq 'true') { }
3797 0 0 if (ref $args{'InstanceId'} eq 'ARRAY')
3808 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3860 0 0 if (ref $args{'ReservedInstancesOfferingId'} eq 'ARRAY')
3870 0 0 if (ref $args{'InstanceCount'} eq 'ARRAY')
3881 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3885 0 0 if ($xml->{'reservedInstancesId'}) { }
3917 0 0 if (ref $args{'InstanceId'} eq 'ARRAY')
3928 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
3932 0 0 if ($xml->{'return'} eq 'true') { }
4014 0 0 if (ref $args{'BlockDeviceMapping'} eq 'ARRAY')
4018 0 0 if $block_device->{'deviceName'}
4019 0 0 if $block_device->{'virtualName'}
4020 0 0 if $block_device->{'noDevice'}
4021 0 0 if $block_device->{'ebs'}{'snapshotId'}
4022 0 0 if $block_device->{'ebs'}{'volumeSize'}
4023 0 0 if $block_device->{'ebs'}{'deleteOnTermination'}
4030 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4062 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4066 0 0 if ($xml->{'return'} eq 'true') { }
4083 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4087 0 0 if ($xml->{'return'} eq 'true') { }
4126 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4130 0 0 if ($xml->{'return'} eq 'true') { }
4176 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4180 0 0 if ($xml->{'return'} eq 'true') { }
4221 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4225 0 0 if ($xml->{'return'} eq 'true') { }
4300 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4304 0 0 if ($xml->{'return'} eq 'true') { }
4517 0 0 if (ref $args{'SecurityGroup'} eq 'ARRAY')
4527 0 0 if (ref $args{'SecurityGroupId'} eq 'ARRAY')
4537 0 0 if (ref $args{'BlockDeviceMapping.VirtualName'} eq 'ARRAY')
4541 0 0 if defined $virtual_name
4547 0 0 if (ref $args{'BlockDeviceMapping.DeviceName'} eq 'ARRAY')
4551 0 0 if defined $device_name
4557 0 0 if (ref $args{'BlockDeviceMapping.Ebs.SnapshotId'} eq 'ARRAY')
4561 0 0 if defined $snapshot_id
4567 0 0 if (ref $args{'BlockDeviceMapping.Ebs.VolumeSize'} eq 'ARRAY')
4571 0 0 if defined $volume_size
4577 0 0 if (ref $args{'BlockDeviceMapping.Ebs.VolumeType'} eq 'ARRAY')
4581 0 0 if defined $volume_type
4587 0 0 if (ref $args{'BlockDeviceMapping.Ebs.DeleteOnTermination'} eq 'ARRAY')
4598 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4622 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instance_elem->{'productCodes'})
4629 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $instance_elem->{'reason'} and ref $instance_elem->{'reason'} ne 'HASH')
4633 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $instance_elem->{'privateDnsName'} and ref $instance_elem->{'privateDnsName'} ne 'HASH')
4637 0 0 if defined $_
0 0 unless (grep {length $_ if defined $_;} $instance_elem->{'dnsName'} and ref $instance_elem->{'dnsName'} ne 'HASH')
4641 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instance_elem->{'stateReason'})
4648 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $instance_elem->{'blockDeviceMapping'})
4694 0 0 if ($product_codes)
4735 0 0 if (ref $args{'InstanceId'} eq 'ARRAY')
4745 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4807 0 0 if (ref $args{'InstanceId'} eq 'ARRAY')
4817 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4870 0 0 if (ref $args{'InstanceId'} eq 'ARRAY')
4880 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }
4937 0 0 if (ref $args{'InstanceId'} eq 'ARRAY')
4948 0 0 if defined $_
0 0 if (grep {length $_ if defined $_;} $xml->{'Errors'}) { }