Condition Coverage

blib/lib/Net/LDAP/LDIF.pm
Criterion Covered Total %
condition 57 147 38.7


and 3 conditions

line !l l&&!r l&&r condition
68 12 0 0 $mode =~ /^\s*\+?>>/ && tell $fh > 0
141 0 0 0 $url =~ /^(https?|ftp|gopher|news:)/ and eval { do { require LWP::UserAgent } }
181 14 0 1 $type and $type eq ':'
14 0 0 $type and $type eq '<'
14 0 0 $type and $type eq '<' and $value =~ s/^(.*?)\s*$/$1/
211 0 14 1 @ldif and $ldif[0] =~ /^version:\s+(\d+)/
232 14 0 0 $self->{'raw'} and not 'dn' =~ /$self->{'raw'}/
238 0 14 4 @ldif and $ldif[0] =~ /^control:\s*/
244 0 0 4 $critical && $critical =~ /true/
274 0 8 6 scalar @ldif and $ldif[0] =~ /^changetype:\s*/
306 0 0 0 defined $modattr and defined $lastattr
315 60 0 0 defined $modattr and $attr ne $modattr
323 60 0 0 $self->{'raw'} and not $attr =~ /$self->{'raw'}/
361 888 0 0 $self->{'raw'} and not $attr =~ /$self->{'raw'}/
443 0 0 284 $res &&= print($fh _wrap($ln, $self->{'wrap'}), "\n")
463 0 0 138 $res &&= $self->_write_attr($attr, $val)
491 0 0 4 $res &&= print($fh _wrap($ln, $self->{'wrap'}), "\n")
547 0 0 1 $res &&= print($fh "version: $self->{'version'}\n")
7 0 1 $self->{'version'} and not $self->{'version_written'}++
568 0 0 15 $res &&= $self->_write_one($change, @args)
583 0 0 9 $res &&= $self->_write_one($change, @args)
590 9 0 0 not $res and $!
611 7 2 0 $type eq 'modify' and not @changes
613 0 0 3 $res &&= $self->write_version
614 0 0 9 $res &&= print($fh "\n")
615 0 0 9 $res &&= $self->_write_dn($entry->dn)
620 0 0 3 $res &&= $self->_write_controls(ref $opt{'control'} eq 'ARRAY' ? @{$opt{'control'};} : $opt{'control'})
622 0 0 9 $res &&= print($fh "changetype: $type\n")
628 0 0 7 $res &&= $self->_write_attrs($entry)
633 0 0 0 $res &&= $self->_write_attr('newrdn', $entry->get_value('newrdn', 'asref', 1))
634 0 0 0 $res &&= print($fh 'deleteoldrdn: ', $deleteoldrdn, "\n")
636 0 0 0 $res &&= $self->_write_attr('newsuperior', $ns)
646 0 0 10 $res &&= print($fh "-\n")
0 2 10 not $self->{'version'} and $dash++
647 0 0 12 $res &&= print($fh "${action}: $attr\n")
648 0 0 12 $res &&= $self->_write_attr($attr, $val)
649 0 0 0 $res &&= print($fh "-\n")
654 0 0 5 $res &&= $self->write_version
655 0 0 15 $res &&= print($fh "\n")
656 0 0 15 $res &&= $self->_write_dn($entry->dn)
657 0 0 15 $res &&= $self->_write_attrs($entry)

or 2 conditions

line l !l condition
24 12 0 shift() || '-'
25 12 0 shift() || 'r'
63 0 12 $opt{'lowercase'} ||= 0
64 3 9 $opt{'change'} ||= 0
65 0 12 $opt{'sort'} ||= 0
66 1 11 $opt{'version'} ||= 0
94 11 1014 $self->{'_buffered_line'} || scalar readline $fh
632 0 0 $entry->get_value('deleteoldrdn') || 0
768 0 0 shift() || 0

or 3 conditions

line l !l&&r !l&&!r condition
325 6 24 30 not defined $lastattr or $lastattr ne $attr
416 271 0 41 length $_[0] <= $len or $len <= 40