Branch Coverage

blib/lib/Net/Whois/Object.pm
Criterion Covered Total %
branch 104 158 65.8


line true false branch
15 0 33 $@ ? :
222 8 28 if (ref $lines[0] eq 'Iterator')
233 0 5184 unless defined $line
235 1 5183 if ($line =~ /^%(\S+)/) { }
5018 165 elsif ($line =~ /^(\S+):\s*(.*)/) { }
72 93 elsif ($line =~ /^%\s+(.*)/) { }
1 92 elsif ($line =~ /^[^%]\s*(.+)/) { }
92 0 elsif ($line =~ /^$/) { }
237 1 0 unless $block
251 40 32 unless $block
265 80 12 if ($object)
277 5092 0 if $attribute
280 39 5053 unless $block
282 80 5012 unless ($object)
288 40 40 if ($block eq 'comment')
324 2 0 if ($option =~ /remove/i) { }
337 18 21 if ($line =~ /^(.+?):/ and $filtered{lc $1})
345 0 3 if $@
370 58 444 if (not defined $type or $type =~ /all/i)
373 0 444 unless $type =~ /(all|primary|mandatory|optional|single|multiple)/i
374 185 259 if ($ra_attributes)
379 121 323 if ($type eq 'single' or $type eq 'multiple')
386 549 7 unless (exists $symbol_table->{$a})
387 192 357 $type eq 'single' ? :
417 1806 1658 defined $self->_TYPE->{$type}{$attribute} ? :
430 0 0 if defined $filtered_attributes
444 0 0 if defined $displayed_attributes
467 2 0 if ($opt =~ /^align$/i) { }
484 607 94 if (ref $val eq 'ARRAY')
490 4 697 unless $val
517 0 0 if ($opt =~ /^align$/i)
527 0 0 if ($html =~ /Modify SUCCEEDED:.*$value/m) { }
549 0 0 unless $options->{'reason'}
554 0 0 if ($html =~ /Delete SUCCEEDED:.*$value/m) { }
578 0 0 if ($opt =~ /^align$/i)
585 0 0 if ($res =~ /^Number of objects processed with errors:\s+(\d+)/m and $1 == 0 and $res =~ /\*\*\*Info:\s+Authorisation for\s+\[[^\]]+]\s+(.+)\s*$/m || $res =~ /(?:Create SUCCEEDED|No operation): \[[^\]]+\]\s+(\S+)/m) { }
605 0 0 if ($self->class and $obj_types_with_autogen_key{$self->class}) { }
675 0 80 unless defined $type and $class{$type}
680 38 5014 if ($a->[0] =~ /source/)
684 33 5 if $rir =~ /^(RIPE|TEST)$/
688 5 75 if $rir
690 0 80 unless eval "require $class"
696 40 40 if ($type eq 'comment') { }
702 80 0 if ($object->{'attributes'})
705 5052 0 if (my $ref = eval { do { $object_returned->can($method) } }) { }
728 1 612 if (ref $value eq 'HASH')
731 1 0 if ($options{'mode'})
735 1 0 if ($options{'value'}) { }
743 349 264 if (defined $value)
745 348 1 if ($mode eq 'replace') { }
1 0 elsif ($mode eq 'delete') { }
748 150 198 unless $self->{$attribute} or $attribute eq 'class'
752 0 1 if (ref $value ne 'HASH' or not $value->{'old'}) { }
772 10 6222 if (ref $value eq 'HASH')
775 8 2 if ($options{'mode'})
779 10 0 if ($options{'value'}) { }
787 5183 1049 if (defined $value)
789 5175 8 if ($mode eq 'append') { }
3 5 elsif ($mode eq 'replace') { }
4 1 elsif ($mode eq 'delete') { }
790 2 5173 if (ref $value eq 'ARRAY') { }
5173 0 elsif (not ref $value) { }
800 2 1 if (ref $value ne 'HASH' or not $value->{'old'} or not $value->{'new'}) { }
805 1 3 if $_ =~ /$old/
809 1 3 if (ref $value ne 'HASH' or not $value->{'old'}) { }
821 0 6228 unless ref $self
837 30 6 ref $self->{$a} ? :
841 9 27 unless $attribute ne $_->[0]
842 1 3 if $self->attribute_is($attribute, 'single') and $self->{$attribute} =~ /$pattern/
846 25 5 if ref $$self{$l->[0]}
851 25 5 if ($self->attribute_is($lines[$i][0], 'multiple')) { }
891 0 0 if (exists $options->{'pgpkey'}) { }
0 0 elsif (exists $options->{'password'}) { }
896 0 0 if $password =~ /\n/
901 0 0 unless $LWP
903 0 0 $self->source eq 'RIPE' ? :
910 0 0 unless ($response->is_success)
929 0 0 unless $auth->{'pgpopts'}
941 0 0 if ($child_exit_status != 0)