Branch Coverage

blib/lib/GnuPG/Interface.pm
Criterion Covered Total %
branch 99 144 68.7


line true false branch
105 0 236 unless my $handles = $args{'handles'}
107 115 121 unless $handles->stdin
108 0 236 unless $handles->stdout
109 123 113 unless $handles->stderr
111 25 211 unless $self->passphrase
113 187 49 $self->passphrase =~ /\S/ && !$handles->passphrase ? :
116 187 49 if ($needs_passphrase_handled)
122 146 37 if ($needs_passphrase_handled)
140 0 236 unless my $handles = $args{'handles'}
149 0 192 if $handles->passphrase and $self->version and $self->cmp_version($self->version, '2.2') > 0
157 236 0 ref $args{'commands'} ? :
0 236 unless my(@commands) = ref $args{'commands'} ? @{$args{'commands'};} : $args{'commands'}
165 24 212 ref $args{'command_args'} ? :
166 44 192 if @command_args and $command_args[0] ne '--'
175 748 904 unless my $fh = $handles->$fh_name
185 280 428 unless my $entry = $fhs{$fh_name}
211 270 634 if $entry->direct
215 293 341 if ($entry->parent_is_source) { }
229 0 236 unless defined $pid
231 53 183 if ($pid == 0)
253 0 53 unless defined $stderr_fd
258 0 53 if ($stdout->parent_end ne $stderr->parent_end and $stderr->direct and my_fileno($stderr->parent_end) == my_fileno($standard_out))
267 19 34 if ($stdin->direct) { }
268 9 10 unless my_fileno($standard_in) == my_fileno($stdin->parent_end)
277 5 48 if ($stdout->direct) { }
278 5 0 unless my_fileno($standard_out) == my_fileno($stdout->parent_end)
287 53 0 if ($stdout->parent_end ne $stderr->parent_end) { }
292 14 39 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 159 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 49 if ($self->version and $self->cmp_version($self->version, 2.2) >= 0 and $commands[0] =~ /^--delete-secret-.*keys?$/)
346 0 53 if $use_loopback_pinentry
354 0 53 if &tainted($ENV{'PATH'})
355 0 0 unless exec @command
363 470 231 unless $entry->direct
368 369 332 unless $entry->parent_is_source
378 332 0 if $parent_end
388 0 283 unless defined $fh
389 0 283 if $fh =~ /^=?(\d+)$/
391 0 283 unless defined $fileno
476 0 75 unless @fields > 3
480 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') { }
481 0 5 if $current_primary_key
495 5 0 if ($expiration_date eq '') { }
502 4 1 $record_type eq 'pub' ? :
540 9 0 if ($expiration_date eq '') { }
548 9 0 if ($sig_type =~ /^([[:xdigit:]]{2})([xl])$/)
566 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')) { }
570 9 0 if ($record_type eq 'sig') { }
0 0 elsif ($record_type eq 'rev') { }
612 5 0 if ($expiration_date eq '') { }
659 5 0 if $current_primary_key
670 19 0 if ($date =~ /^\d+$/)
718 5 0 unless $self->cmp_version($self->version, '2.2') >= 0
724 3 0 unless $self->cmp_version($self->version, '2.2') >= 0
830 0 94 unless ($self->cmp_version($version, '2.2') >= 0 or $self->cmp_version($version, '1.4') >= 0 and $self->cmp_version($version, '1.5') < 0)
843 496 0 @a > @b ? :
847 496 306 if $a[$i] <=> $b[$i]
859 0 4 unless defined $self->passphrase
887 3 6 if (/^\[GNUPG:\]\s*(GOOD_PASSPHRASE|SIG_CREATED)/)