Branch Coverage

blib/lib/GnuPG/Interface.pm
Criterion Covered Total %
branch 98 142 69.0


line true false branch
105 0 223 unless my $handles = $args{'handles'}
107 111 112 unless $handles->stdin
108 0 223 unless $handles->stdout
109 119 104 unless $handles->stderr
111 25 198 unless $self->passphrase
113 174 49 $self->passphrase =~ /\S/ && !$handles->passphrase ? :
116 174 49 if ($needs_passphrase_handled)
122 136 37 if ($needs_passphrase_handled)
140 0 223 unless my $handles = $args{'handles'}
149 0 179 if $handles->passphrase and $self->version and $self->cmp_version($self->version, '2.2') > 0
157 223 0 ref $args{'commands'} ? :
0 223 unless my(@commands) = ref $args{'commands'} ? @{$args{'commands'};} : $args{'commands'}
165 15 208 ref $args{'command_args'} ? :
166 35 188 if @command_args and $command_args[0] ne '--'
175 709 852 unless my $fh = $handles->$fh_name
185 267 402 unless my $entry = $fhs{$fh_name}
211 262 590 if $entry->direct
215 271 319 if ($entry->parent_is_source) { }
229 0 223 unless defined $pid
231 50 173 if ($pid == 0)
253 0 50 unless defined $stderr_fd
258 0 50 if ($stdout->parent_end ne $stderr->parent_end and $stderr->direct and my_fileno($stderr->parent_end) == my_fileno($standard_out))
267 19 31 if ($stdin->direct) { }
268 9 10 unless my_fileno($standard_in) == my_fileno($stdin->parent_end)
277 5 45 if ($stdout->direct) { }
278 5 0 unless my_fileno($standard_out) == my_fileno($stdout->parent_end)
287 50 0 if ($stdout->parent_end ne $stderr->parent_end) { }
292 14 36 if ($stderr->direct) { }
293 0 14 unless my_fileno($standard_err) == my_fileno($stderr->parent_end)
303 0 0 unless my_fileno($standard_err) == my_fileno($standard_out)
309 150 41 if $entry->is_std
314 1 40 if ($entry->direct) { }
315 0 1 if ($entry->name_shows_dup) { }
316 0 0 $entry->parent_is_source ? :
339 0 50 if $use_loopback_pinentry
347 0 50 if &tainted($ENV{'PATH'})
348 0 0 unless exec @command
356 438 223 unless $entry->direct
361 349 312 unless $entry->parent_is_source
371 312 0 if $parent_end
381 0 271 unless defined $fh
382 0 271 if $fh =~ /^=?(\d+)$/
384 0 271 unless defined $fileno
469 0 75 unless @fields > 3
473 5 70 if ($record_type eq 'pub' or $record_type eq 'sec') { }
10 60 elsif ($record_type eq 'fpr') { }
9 51 elsif ($record_type eq 'sig' or $record_type eq 'rev') { }
10 41 elsif ($record_type eq 'uid') { }
0 41 elsif ($record_type eq 'uat') { }
5 36 elsif ($record_type eq 'sub' or $record_type eq 'ssb') { }
4 32 elsif ($record_type eq 'rvk') { }
28 4 elsif ($record_type eq 'pkd') { }
0 8 elsif ($record_type ne 'tru' and $record_type ne 'grp') { }
474 0 5 if $current_primary_key
488 5 0 if ($expiration_date eq '') { }
495 4 1 $record_type eq 'pub' ? :
533 9 0 if ($expiration_date eq '') { }
541 9 0 if ($sig_type =~ /^([[:xdigit:]]{2})([xl])$/)
559 9 0 if ($current_signed_item->isa('GnuPG::Key') or $current_signed_item->isa('GnuPG::UserId') or $current_signed_item->isa('GnuPG::Revoker') or $current_signed_item->isa('GnuPG::UserAttribute')) { }
563 9 0 if ($record_type eq 'sig') { }
0 0 elsif ($record_type eq 'rev') { }
605 5 0 if ($expiration_date eq '') { }
652 5 0 if $current_primary_key
663 19 0 if ($date =~ /^\d+$/)
711 5 0 unless $self->cmp_version($self->version, '2.2') >= 0
717 3 0 unless $self->cmp_version($self->version, '2.2') >= 0
823 0 90 unless ($self->cmp_version($version, '2.2') >= 0 or $self->cmp_version($version, '1.4') >= 0 and $self->cmp_version($version, '1.5') < 0)
836 426 0 @a > @b ? :
840 426 292 if $a[$i] <=> $b[$i]
852 0 4 unless defined $self->passphrase
880 3 6 if (/^\[GNUPG:\]\s*(GOOD_PASSPHRASE|SIG_CREATED)/)