Branch Coverage

blib/lib/GnuPG/Crypticle.pm
Criterion Covered Total %
branch 0 108 0.0


line true false branch
62 0 0 if ($self->has_gpg_temp_home)
67 0 0 unless (-d $gpgdir and -w $gpgdir or File::Path::make_path($gpgdir, {'error', \$mkpatherr}) or -d $gpgdir and -w $gpgdir)
73 0 0 if ($mkpatherr) { }
86 0 0 unless (File::Copy::cp($file, $gpgdir))
114 0 0 if (ref $opts{'file'} and defined fileno $opts{'file'}) { }
0 0 elsif (not open($fh, '<:raw', $opts{'file'})) { }
123 0 0 if ($stat->size > 100)
128 0 0 if (not defined $bytes) { }
0 0 elsif (not $bytes) { }
140 0 0 if ($magic =~ /^\xa6\x00/ or $magic =~ /^\x85[\x01\x02\x04]/ or $magic =~ /^-----BEGIN\x20PGP\x20(SIGNED\x20)?MESSAGE-/)
160 0 0 if ($dest)
161 0 0 if (defined fileno $dest) { }
162 0 0 unless (binmode $dest)
169 0 0 unless (open $dest, '>:raw', $file)
174 0 0 if (defined fileno STDOUT)
175 0 0 unless (open $stdout, '>&', \*STDOUT)
179 0 0 unless (open STDOUT, '>&', $dest)
183 0 0 if ($error)
184 0 0 if (defined fileno $error) { }
185 0 0 unless (binmode $error)
192 0 0 unless (open $error, '>>:raw', $file)
197 0 0 if (defined fileno STDERR)
198 0 0 unless (open $stderr, '>&', \*STDERR)
202 0 0 unless (open STDERR, '>&', $error)
206 0 0 if ($source)
207 0 0 if (defined fileno $source) { }
208 0 0 unless (binmode $source)
215 0 0 unless (open $source, '<:raw', $file)
220 0 0 if (defined fileno STDIN)
221 0 0 unless (open $stdin, '<&', \*STDIN)
225 0 0 unless (open STDIN, '<&', $source)
229 0 0 if ($self->has_gpg_pass_file) { }
236 0 0 if ($self->has_gpg_temp_home) { }
243 0 0 unless (system($self->gpg_bin, '--batch', '--no-tty', @{$opts{'gpg_args'};}) == 0)
244 0 0 if ($! == 0) { }
251 0 0 if ($self->has_gpg_pass_file)
254 0 0 if ($stdin)
255 0 0 unless (open STDIN, '<&', $stdin)
259 0 0 if $close_source
260 0 0 if ($stderr)
261 0 0 unless (open STDERR, '>&', $stderr)
265 0 0 if $close_error
266 0 0 if ($stdout)
267 0 0 unless (open STDOUT, '>&', $stdout)
271 0 0 if $close_dest
272 0 0 if $gpg_fail
278 0 0 if (my $file = $self->gpg_pass_file)
279 0 0 if (ref $file) { }
281 0 0 unless ($flags = fcntl($file, 1, 0))
284 0 0 unless (fcntl $file, 2, $flags & 18446744073709551614)
291 0 0 unless (open $fh, '<', $file)
295 0 0 unless ($flags = fcntl($fh, 1, 0))
298 0 0 unless (fcntl $fh, 2, $flags & 18446744073709551614)
308 0 0 unless (open $fh, '<', 'File::Spec'->devnull)