Branch Coverage

blib/lib/PAR.pm
Criterion Covered Total %
branch 79 208 37.9


line true false branch
16 0 4 if (eval "require prefork")
358 4 3 unless grep {$_ eq \&PAR::find_par;} @INC
359 4 3 unless grep {$_ eq \&PAR::find_par_last;} @INC
363 3 1 if (ref $par eq 'HASH') { }
0 1 elsif ($par =~ /[?*{}\[\]]/) { }
380 0 6 if $PAR::__import
389 0 6 if (unpar($progname))
401 0 0 if ($progname and not $member)
414 0 0 if (defined $ARGV[0] and not $member)
415 0 0 unless $member = _first_member($zip, "script/$ARGV[0]", "script/$ARGV[0].pl", $ARGV[0], "$ARGV[0].pl")
425 0 0 unless ($member)
442 0 3 if (exists $opt->{'repository'} and exists $opt->{'file'}) { }
0 3 elsif (exists $opt->{'file'} and exists $opt->{'install'} || exists $opt->{'upgrade'}) { }
0 3 elsif (not exists $opt->{'repository'} || exists $opt->{'file'}) { }
449 0 0 exists $opt->{'install'} ? :
457 3 0 if (exists $opt->{'file'}) { }
459 0 3 unless defined $opt->{'file'}
463 2 1 unless defined $fallback
465 2 1 if (not $fallback) { }
478 0 0 unless $client
480 0 0 if (defined $opt->{'run'})
492 1 2 if (defined $opt->{'run'})
501 1 0 !($script =~ m[^script/]) ? :
507 0 1 unless (defined $member)
526 0 0 if ($@ or not eval "PAR::Repository::Client"->VERSION >= "0.04")
530 0 0 if ($opt->{'upgrade'} and not eval "PAR::Repository::Client"->VERSION >= "0.22")
534 0 0 if ($opt->{'dependencies'} and not eval "PAR::Repository::Client"->VERSION >= "0.23")
541 0 0 if (ref $url and UNIVERSAL::isa($url, 'PAR::Repository::Client')) { }
553 0 0 if (exists $opt->{'fallback'} and not $opt->{'fallback'}) { }
559 0 0 if $opt->{'upgrade'}
572 4 19 if $member
585 0 0 unless $cache
588 0 0 if ($name =~ /$regex/)
605 0 1 unless $member->extractToFileHandle($fh) == 0
612 0 1 if $@ =~ /^_TK_EXIT_\((\d+)\)/
613 0 1 if $@
626 0 0 unless $member->extractToFileHandle($fh) == 0
643 0 0 if $@ =~ /^_TK_EXIT_\((\d+)\)/
644 0 0 if $@
651 0 0 unless open my $ffh, "<", $filename
659 0 0 unless open my $fh, "<", \$string
666 0 0 if $@ =~ /^_TK_EXIT_\((\d+)\)/
667 0 0 if $@
679 0 1 if (ref $file_or_azip_handle and $file_or_azip_handle->isa('Archive::Zip::Archive')) { }
692 0 1 unless $zip->read($file) == 0
697 1 0 defined $PAR::Config{'dlext'} ? :
701 1 0 unless (-d $inc and -e $canary)
705 0 1 unless open my $lock, ">", $inc_lock
712 0 1 if eval { do { require Archive::Unzip::Burst; Archive::Unzip::Burst::unzip($file_or_azip_handle, $inc) == 0 } }
722 0 7 if -e $outfile and not -w _
751 6 0 if not exists $inc_exists{$_}
758 0 7 if (my($xs_dll) = $name =~ m[/(auto/.*\.\Q$dlext\E)$])
776 0 22 if (@PAR::UpgradeRepositoryObjects)
785 0 0 if (exists $INC{$args[1]})
792 0 0 $line ? :
809 22 0 if defined $rv or not @PAR::PriorityRepositoryObjects
817 0 0 if ($local_file)
834 1 2 if defined $rv
837 2 0 unless @PAR::RepositoryObjects
844 0 0 if ($local_file)
861 5 20 @$INC_ARY ? :
862 206 2 unless my $rv = unpar($path, $file, $member_only, 1)
864 2 0 if lc($file) =~ /^(?!tk).*\.pm$/
873 0 0 unless @par_files
876 0 0 unless my $inc_ref = $PAR::PAR_INC{$par}
901 0 1 unless my $member = _first_member($zip, $file)
916 0 218 unless defined $par
921 0 218 if $PAR::__unpar
924 211 7 unless ($zip)
926 0 211 if ($par =~ m[^\w+://]) { }
0 211 elsif (ref $par eq 'SCALAR') { }
209 2 elsif (not +($allow_other_ext || $par =~ /\.par\z/i) && -f $par) { }
931 0 0 if $par =~ /[?&;]/
936 0 0 unless (-d $ENV{'PAR_CACHE'})
939 0 0 unless -d $ENV{'PAR_CACHE'}
949 0 0 unless (%escapes)
959 0 0 unless -e $file and -f _
973 209 0 unless -f $par
980 2 0 unless (ref $par)
993 0 2 unless $rv == 0
1003 0 0 if $member->isDirectory
1005 0 0 unless $content =~ /^PK\003\004/
1015 2 0 if (not $unpar_options{'no_shlib_unpack'} and defined $ENV{'PAR_TEMP'})
1020 0 0 if $member->isDirectory
1022 0 0 unless $member_name =~ m[ \/([^/]+)$ ]x or $member_name =~ m[ ^([^/]+)$ ]
1031 0 0 unless (-e $dest_name)
1033 0 0 unless $member->extractToFileNamed($dest_name) == 0
1049 2 8 if (defined $ENV{$key} and $ENV{$key} ne '') { }
1054 2 0 unless grep {$_ eq $tempdir;} split(/$separator/, $ENV{$key}, 0)
1064 4 5 unless defined $file
1066 3 2 unless my $member = _first_member($zip, "lib/$file", "arch/$file", "$arch/$file", "$ver/$file", "$ver/$arch/$file", $file)
1075 0 2 if $member_only
1081 0 2 unless $member->extractToFileHandle($fh) == 0
1092 0 3 if ($ENV{'PAR_CLEAN'} or not defined $name)
1095 0 0 if (defined &File::Temp::tempfile)
1099 0 0 unless my($fh, $filename) = File::Temp::tempfile("DIR", $PAR::SetupTemp::PARTemp, "UNLINK", $^O ne 'MSWin32' && !($^O =~ /hpux/))
1115 3 0 unless (-r $filename)
1118 0 3 unless open my $fh, ">", $tempname
1124 0 3 unless rename $tempname, $filename
1127 0 3 unless open my $fh, "<", $filename
1141 0 4 unless (ref $zip)
1161 2 2 unless $cache
1175 0 23 unless $cache
1186 2 0 if (exists $ENV{'PAR_CLEAN'} and $ENV{'PAR_CLEAN'} and exists $ENV{'PAR_TEMP'} and defined $ENV{'PAR_TEMP'} and -d $ENV{'PAR_TEMP'})