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/i
270 0 8 6 scalar @ldif and $ldif[0] =~ /^changetype:\s*/
302 0 0 0 defined $modattr and defined $lastattr
311 60 0 0 defined $modattr and $attr ne $modattr
319 60 0 0 $self->{'raw'} and not $attr =~ /$self->{'raw'}/
357 888 0 0 $self->{'raw'} and not $attr =~ /$self->{'raw'}/
439 0 0 284 $res &&= print($fh _wrap($ln, $self->{'wrap'}), "\n")
459 0 0 138 $res &&= $self->_write_attr($attr, $val)
487 0 0 4 $res &&= print($fh _wrap($ln, $self->{'wrap'}), "\n")
543 0 0 1 $res &&= print($fh "version: $self->{'version'}\n")
7 0 1 $self->{'version'} and not $self->{'version_written'}++
564 0 0 15 $res &&= $self->_write_one($change, @args)
579 0 0 9 $res &&= $self->_write_one($change, @args)
586 9 0 0 not $res and $!
607 7 2 0 $type eq 'modify' and not @changes
609 0 0 3 $res &&= $self->write_version
610 0 0 9 $res &&= print($fh "\n")
611 0 0 9 $res &&= $self->_write_dn($entry->dn)
616 0 0 3 $res &&= $self->_write_controls(ref $opt{'control'} eq 'ARRAY' ? @{$opt{'control'};} : $opt{'control'})
618 0 0 9 $res &&= print($fh "changetype: $type\n")
624 0 0 7 $res &&= $self->_write_attrs($entry)
629 0 0 0 $res &&= $self->_write_attr('newrdn', $entry->get_value('newrdn', 'asref', 1))
630 0 0 0 $res &&= print($fh 'deleteoldrdn: ', $deleteoldrdn, "\n")
632 0 0 0 $res &&= $self->_write_attr('newsuperior', $ns)
642 0 0 10 $res &&= print($fh "-\n")
0 2 10 not $self->{'version'} and $dash++
643 0 0 12 $res &&= print($fh "${action}: $attr\n")
644 0 0 12 $res &&= $self->_write_attr($attr, $val)
645 0 0 0 $res &&= print($fh "-\n")
650 0 0 5 $res &&= $self->write_version
651 0 0 15 $res &&= print($fh "\n")
652 0 0 15 $res &&= $self->_write_dn($entry->dn)
653 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
628 0 0 $entry->get_value('deleteoldrdn') || 0
764 0 0 shift() || 0

or 3 conditions

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