Branch Coverage

blib/lib/Net/LDAP/Schema.pm
Criterion Covered Total %
branch 54 96 56.2


line true false branch
20 1 1 @_ ? :
34 0 2 unless (defined $arg)
42 0 2 if (ref $arg) { }
2 0 elsif (-f $arg) { }
43 0 0 if (eval { do { $arg->isa('Net::LDAP::Entry') } }) { }
0 0 elsif (eval { do { $arg->isa('Net::LDAP::Search') } }) { }
47 0 0 unless ($entry = $arg->entry)
61 0 2 unless ($entry)
76 0 2 if ($@)
91 0 0 @_ ? :
92 0 0 unless my $entry = $self->{'entry'}
124 0 1 unless my $elem = $self->objectclass($oc)
127 0 1 unless $elem->{'sup'}
139 0 2 unless my(@oc) = @_
144 0 2 if (eval { do { $oc[0]->isa('Net::LDAP::Entry') } })
146 0 0 unless @oc = $entry->get_value('objectclass')
156 0 3 if $done{lc $oc}++
158 1 2 unless my $elem = $self->objectclass($oc)
159 2 0 if (my $res = $elem->{$must_or_may})
162 1 1 unless my $sup = $elem->{'sup'}
183 55 1 $elem || ($elem = $oid->{$_}) && $elem->{'type'} eq $type ? :
188 2 53 wantarray ? :
281 0 2 unless defined $entry
290 8 10 unless $vals
297 0 828 if $val eq ''
319 0 828 unless @tokens and pos $val == length $val
323 828 0 if $tokens[0] eq '('
324 828 0 if $tokens[-1] eq ')'
329 0 828 $type eq 'xat' ? :
333 350 2648 if (exists $flags->{$tag}) { }
2648 0 elsif (@tokens) { }
337 192 2456 if (($schema_entry{$tag} = shift @tokens) eq '(')
342 192 4598 if $tmp eq ')'
343 2418 2180 unless $tmp eq '$'
346 0 4598 unless @tokens
352 246 2402 if exists $listops{$tag} and not ref $schema_entry{$tag}
363 70 758 if exists $schema_entry{'syntax'} and $schema_entry{'syntax'} =~ s/{(\d+)}//
369 64 764 unless exists $schema_entry{'name'}
374 44 784 if (ref $schema_entry{'name'})
377 44 0 if @$aliases
383 828 0 unless $type eq 'xat'
396 2 0 if (my $xat = $schema->{'xat'})
400 0 0 unless $k =~ /^(oid|type|name|aliases)$/
421 0 0 unless my $elem = $self->attribute($attr)
423 0 0 if $syntax = $elem->{'syntax'}
425 0 0 unless $elem->{'sup'}
449 30 10 if (exists $attrtype->{$matchtype}) { }
8 2 elsif (exists $attrtype->{'sup'}) { }