Branch Coverage

blib/lib/GnuPG/Interface.pm
Criterion Covered Total %
branch 100 144 69.4


line true false branch
105 0 241 unless my $handles = $args{'handles'}
107 120 121 unless $handles->stdin
108 0 241 unless $handles->stdout
109 128 113 unless $handles->stderr
111 28 213 unless $self->passphrase
113 187 54 $self->passphrase =~ /\S/ && !$handles->passphrase ? :
116 187 54 if ($needs_passphrase_handled)
122 146 40 if ($needs_passphrase_handled)
140 0 241 unless my $handles = $args{'handles'}
149 0 192 if $handles->passphrase and $self->version and $self->cmp_version($self->version, "2.2") > 0
157 241 0 ref $args{'commands'} ? :
0 241 unless my(@commands) = ref $args{'commands'} ? @{$args{'commands'};} : $args{'commands'}
165 24 217 ref $args{'command_args'} ? :
166 44 197 if @command_args and $command_args[0] ne "--"
175 768 919 unless my $fh = $handles->$fh_name
185 290 433 unless my $entry = $fhs{$fh_name}
211 280 639 if $entry->direct
215 293 346 if ($entry->parent_is_source) { }
229 0 241 unless defined $pid
231 55 186 if ($pid == 0)
253 0 55 unless defined $stderr_fd
258 0 55 if ($stdout->parent_end ne $stderr->parent_end and $stderr->direct and my_fileno($stderr->parent_end) == my_fileno($standard_out))
267 21 34 if ($stdin->direct) { }
268 9 12 unless my_fileno($standard_in) == my_fileno($stdin->parent_end)
277 5 50 if ($stdout->direct) { }
278 5 0 unless my_fileno($standard_out) == my_fileno($stdout->parent_end)
287 55 0 if ($stdout->parent_end ne $stderr->parent_end) { }
292 16 39 if ($stderr->direct) { }
293 0 16 unless my_fileno($standard_err) == my_fileno($stderr->parent_end)
303 0 0 unless my_fileno($standard_err) == my_fileno($standard_out)
309 165 44 if $entry->is_std
314 1 43 if ($entry->direct) { }
315 0 1 if ($entry->name_shows_dup) { }
316 0 0 $entry->parent_is_source ? :
342 0 50 if ($self->version and $self->cmp_version($self->version, "2.2") >= 0 and $commands[0] =~ /^--delete-secret-.*keys?$/)
346 0 55 if $use_loopback_pinentry
358 2 53 if &tainted($ENV{'PATH'})
359 0 0 unless exec @command
367 473 237 unless $entry->direct
372 375 335 unless $entry->parent_is_source
382 335 0 if $parent_end
392 0 297 unless defined $fh
393 0 297 if $fh =~ /^=?(\d+)$/
395 0 297 unless defined $fileno
480 0 75 unless @fields > 3
484 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') { }
485 0 5 if $current_primary_key
499 5 0 if ($expiration_date eq '') { }
506 4 1 $record_type eq 'pub' ? :
544 9 0 if ($expiration_date eq '') { }
552 9 0 if ($sig_type =~ /^([[:xdigit:]]{2})([xl])$/)
570 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')) { }
574 9 0 if ($record_type eq 'sig') { }
0 0 elsif ($record_type eq 'rev') { }
616 5 0 if ($expiration_date eq '') { }
663 5 0 if $current_primary_key
674 19 0 if ($date =~ /^\d+$/)
722 5 0 unless $self->cmp_version($self->version, "2.2") >= 0
728 3 0 unless $self->cmp_version($self->version, "2.2") >= 0
834 0 97 unless ($self->cmp_version($version, "2.2") >= 0 or $self->cmp_version($version, "1.4") >= 0 and $self->cmp_version($version, "1.5") < 0)
847 506 0 @a > @b ? :
851 506 315 if $a[$i] <=> $b[$i]
863 0 4 unless defined $self->passphrase
891 3 6 if (/^\[GNUPG:\]\s*(GOOD_PASSPHRASE|SIG_CREATED)/)