Branch Coverage

blib/lib/Slackware/Slackget/File.pm
Criterion Covered Total %
branch 20 84 23.8


line true false branch
46 4 0 unless defined $self->{'file-encoding'}
47 2 2 if (defined $file and -e $file and not defined $args{'load-raw'})
51 0 2 if $self->{'TYPE'} eq 'empty'
52 2 0 unless $self->{'TYPE'} eq 'gzip' or $self->{'TYPE'} eq 'bzip2' or $self->{'TYPE'} eq 'ASCII' or $self->{'TYPE'} eq 'XML' or $self->{'TYPE'} eq 'Quake'
56 0 0 if $args{'mode'} and $args{'mode'} eq 'write' || $args{'mode'} eq 'append' || $args{'mode'} eq 'rewrite'
57 0 2 if defined $self->{'MODE'} and $self->{'MODE'} eq 'rewrite'
59 0 2 if $args{'binary'}
60 0 2 if $args{'skip-white-line'}
61 0 2 if $args{'skip-white-lines'}
63 0 2 if $args{'load-raw'}
64 0 2 if (defined $file and -e $file and not defined $self->{'no-auto-load'}) { }
135 0 0 if ($file) { }
143 0 0 unless (-e $file or -R $file)
150 0 0 if (defined $self->{'TYPE'} and $self->{'TYPE'} eq 'ASCII' || $self->{'TYPE'} eq 'XML' || $self->{'TYPE'} eq 'Quake' and not defined $self->{'LOAD_RAW'}) { }
0 0 elsif ($self->{'TYPE'} eq 'bzip2' and not defined $self->{'LOAD_RAW'}) { }
0 0 elsif ($self->{'TYPE'} eq 'gzip' and not defined $self->{'LOAD_RAW'}) { }
0 0 elsif (defined $self->{'LOAD_RAW'} or $self->{'TYPE'} eq '') { }
153 0 0 if (open F2, "<:encoding($self->{'file-encoding'})", $file) { }
155 0 0 if $self->{'BINARY'}
156 0 0 if ($self->{'SKIP_WL'}) { }
161 0 0 if $tmp =~ /^\s*$/
208 0 0 if (open F2, $file) { }
210 0 0 if $self->{'BINARY'}
260 0 0 if $self->is_locked
262 0 0 unless Write({'file-encoding', $self->{'file-encoding'}}, "$self->{'FILENAME'}.lock", $self)
297 0 0 if ($self->is_locked) { }
299 0 0 if ($self->_verify_lock_maker) { }
301 0 0 unless unlink "$self->{'FILENAME'}.lock"
326 0 0 if ($locker eq $object) { }
349 0 0 if -e $self->{'FILENAME'} . '.lock'
376 2 0 unless $name
377 2 0 unless @data
381 0 2 if (defined $self->{'MODE'} and $self->{'MODE'} eq 'append')
385 2 0 if (open FILE, "${mode}:encoding($self->{'file-encoding'})", $name) { }
387 0 2 if $self->{'BINARY'}
390 0 2 if ($self->{'SKIP_WL'}) { }
397 0 0 if $tmp =~ /^\s*$/
409 0 2 unless close FILE
516 0 0 unless $start
517 0 0 unless $stop
574 0 0 $_[1] ? :
591 2 2 $_[1] ? :