Branch Coverage

blib/lib/RPerl/Compiler.pm
Criterion Covered Total %
branch 130 428 30.3


line true false branch
66 0 1374 unless (-f $file_name)
70 0 1374 unless open my filehandleref $FILE_HANDLE, '<', $file_name
83 414 31436 if ($file_line =~ /^\s*package\s+[\w:]+\s*;\s*$/msx)
84 410 4 if (not defined $top_level_package_name) { }
94 4660 27186 if ($file_line =~ /^\s*use\s+[\w:]+/msx)
96 1376 3284 if ($file_line =~ /use\s+RPerl\s*;/ or $file_line =~ /use\s+RPerl::AfterSubclass\s*;/) { }
0 3284 elsif ($file_line =~ /use\s+lib/) { }
3140 144 elsif (not $file_line =~ /use\s+parent/) { }
115 0 144 unless ($use_rperl)
128 100 44 if ($package_name eq 'RPerl::CompileUnit::Module::Class')
141 44 88 if (-e $package_file_name_included) { }
149 0 44 if ($package_file_name_included eq '')
162 44 0 if ($find_grandparents_recurse)
175 0 1374 unless close $FILE_HANDLE
202 0 0 unless (-f $file_name)
206 0 0 unless open my filehandleref $FILE_HANDLE, '<', $file_name
219 0 0 if ($file_line =~ /^\s*package\s+[\w:]+\s*;\s*$/msx and not defined $top_level_package_name)
237 0 0 if ($file_line =~ /^\s*use\s+[\w:]+/msx)
239 0 0 if ($file_line =~ /use\s+RPerl\s*;/ or $file_line =~ /use\s+RPerl::AfterSubclass\s*;/) { }
0 0 elsif ($file_line =~ /use\s+strict\s*;/ or $file_line =~ /use\s+warnings\s*;/ or $file_line =~ /use\s+RPerl::CompileUnit::Module::Class\s*;/ or $file_line =~ /use\s+RPerl::Class\s*;/ or $file_line =~ /use\s+RPerl::Config\s*;/ or $file_line =~ /use\s+RPerl::Exporter.*;/ or $file_line =~ /use\s+\w+Perl::Config\s*;/ or $file_line =~ /use\s+perlapinames_generated/ or $file_line =~ /use\s+parent/ or $file_line =~ /use\s+constant/ or $file_line =~ /use\s+overload/ or $file_line =~ /use\s+integer/ or $file_line =~ /use\s+[0-9]/) { }
0 0 elsif (defined $top_level_package_name and $file_line =~ /use\s+$top_level_package_name\s*;/) { }
0 0 elsif ($file_line =~ /use\s+rperlsse\s*;/) { }
0 0 elsif ($file_line =~ /use\s+rperlgmp\s*;/) { }
0 0 elsif ($file_line =~ /use\s+rperlgsl\s*;/) { }
0 0 elsif ($file_line =~ /use\s+lib/) { }
269 0 0 if (substr($RPerl::Compiler::Config{'archname'}, 0, 3) eq 'arm')
275 0 0 unless (exists $modes->{'_enable_sse'} and defined $modes->{'_enable_sse'})
285 0 0 unless (exists $modes->{'_enable_gmp'} and defined $modes->{'_enable_gmp'})
295 0 0 unless (exists $modes->{'_enable_gsl'} and defined $modes->{'_enable_gsl'})
312 0 0 unless ($use_rperl)
343 0 0 if (-e $package_file_name_included) { }
351 0 0 if ($package_file_name_included eq '')
368 0 0 if ($find_subdependencies_recurse)
381 0 0 unless close $FILE_HANDLE
503 0 0 if ($modes->{'compile'} eq 'PARSE' or $modes->{'compile'} eq 'GENERATE' or $modes->{'compile'} eq 'SAVE')
512 0 0 if ($modes->{'compile'} eq 'GENERATE' or $modes->{'compile'} eq 'SAVE')
520 0 0 if ($modes->{'compile'} eq 'SAVE' or $modes->{'compile'} eq 'SAVE_DEFERRED')
544 0 0 if ($modes->{'compile'} eq 'PARSE' or $modes->{'compile'} eq 'GENERATE' or $modes->{'compile'} eq 'SAVE' or $modes->{'compile'} eq 'SUBCOMPILE')
554 0 622 if ($modes->{'compile'} eq 'GENERATE' or $modes->{'compile'} eq 'SAVE' or $modes->{'compile'} eq 'SUBCOMPILE')
563 0 622 if ($modes->{'compile'} eq 'SAVE' or $modes->{'compile'} eq 'SAVE_DEFERRED' or $modes->{'compile'} eq 'SUBCOMPILE' or $modes->{'compile'} eq 'SUBCOMPILE_DEFERRED')
573 0 622 if ($modes->{'parallel'} eq 'OPENMP')
579 0 622 if ($modes->{'compile'} eq 'SUBCOMPILE' or $modes->{'compile'} eq 'SUBCOMPILE_DEFERRED')
614 0 1330 if (defined $output_file_name_prefixes->[$i]) { }
618 0 0 if ($input_file_name_prefix eq '')
633 964 366 if ($input_file_name =~ /[.]pl$/msx) { }
634 0 964 if ($modes->{'subcompile'} eq 'ASSEMBLE') { }
0 964 elsif ($modes->{'subcompile'} eq 'ARCHIVE') { }
0 964 elsif ($modes->{'subcompile'} eq 'SHARED') { }
964 0 elsif ($modes->{'subcompile'} eq 'STATIC' or $modes->{'subcompile'} eq 'DYNAMIC' or $modes->{'subcompile'} eq 'OFF' and $modes->{'compile'} eq 'PARSE' || $modes->{'compile'} eq 'GENERATE' || $modes->{'compile'} eq 'SAVE' || $modes->{'compile'} eq 'SUBCOMPILE') { }
670 0 964 if ($RPerl::Compiler::OSNAME eq 'MSWin32') { }
671 0 0 if ($modes->{'parallel'} eq 'OFF') { }
0 0 elsif ($modes->{'parallel'} eq 'OPENMP') { }
682 964 0 if ($modes->{'parallel'} eq 'OFF') { }
0 0 elsif ($modes->{'parallel'} eq 'OPENMP') { }
702 0 366 if ($modes->{'subcompile'} eq 'ASSEMBLE') { }
0 366 elsif ($modes->{'subcompile'} eq 'ARCHIVE') { }
0 366 elsif ($modes->{'subcompile'} eq 'SHARED') { }
0 366 elsif ($modes->{'subcompile'} eq 'STATIC') { }
366 0 elsif ($modes->{'subcompile'} eq 'DYNAMIC' or $modes->{'subcompile'} eq 'OFF' and $modes->{'compile'} eq 'PARSE' || $modes->{'compile'} eq 'GENERATE' || $modes->{'compile'} eq 'SAVE' || $modes->{'compile'} eq 'SUBCOMPILE') { }
743 665 665 if ($modes->{'ops'} eq 'CPP')
747 0 665 if ($modes->{'parallel'} eq 'OPENMP')
769 0 0 if (substr($suffix_key, 0, 1) eq '_')
770 0 0 if (not exists $file_name_group->{$suffix_key} && defined $file_name_group->{$suffix_key} or $file_name_group->{$suffix_key} eq '')
779 0 0 if ($modes->{'ops'} eq 'CPP')
786 0 0 if ($modes->{'_input_file_name'} =~ /[.]pm$/msx)
801 0 0 if (substr($suffix_key, 0, 1) eq '_')
802 0 0 if (not exists $source_group->{$suffix_key} && defined $source_group->{$suffix_key} or $source_group->{$suffix_key} eq '')
812 0 0 if ($file_name eq '_TEMPFILE') { }
816 0 0 unless print {$SOURCE_FILE_HANDLE;} $source
819 0 0 unless close $SOURCE_FILE_HANDLE
824 0 0 if (-f $file_name)
825 0 0 unless unlink $file_name
830 0 0 unless open $SOURCE_FILE_HANDLE, '>', $file_name
834 0 0 unless print {$SOURCE_FILE_HANDLE;} $source
837 0 0 unless close $SOURCE_FILE_HANDLE
842 0 0 if ($suffix_key eq 'PMC' or $suffix_key eq 'EXE') { }
0 0 elsif ($suffix_key eq 'H' or $suffix_key eq 'CPP') { }
845 0 0 if (defined $perltidy_path) { }
856 0 0 if (defined $astyle_path) { }
861 0 0 if (-f $file_name . '.orig')
862 0 0 unless unlink $file_name . '.orig'
886 16 0 if (not exists $source_group->{'H'} && defined $source_group->{'H'}) { }
891 16 284 if ($source_group_CPP_line =~ /__NEED_HEADER_PATH/)
907 0 48 if ($RPerl::Compiler::OSNAME eq 'MSWin32') { }
908 0 0 if (substr($file_path, 0, 2) eq '.\\')
913 0 48 if (substr($file_path, 0, 2) eq './')
932 0 48 if (substr($path, 0, 4) eq 'lib\\') { }
0 48 elsif (substr($path, 0, 6) eq '.\\lib\\') { }
0 48 elsif (substr($path, 0, 9) eq 'blib\\lib\\') { }
0 48 elsif (substr($path, 0, 11) eq '.\\blib\\lib\\') { }
0 48 elsif (substr($path, 0, 4) eq 'lib/') { }
0 48 elsif (substr($path, 0, 6) eq './lib/') { }
48 0 elsif (substr($path, 0, 9) eq 'blib/lib/') { }
0 0 elsif (substr($path, 0, 11) eq './blib/lib/') { }
976 0 16 if (exists $source_group->{'H'})
979 16 0 if (exists $source_group->{'CPP'})
1003 0 21482 if ($inside_comment)
1004 0 0 if ($input_source_code_line =~ /^=cut$/msx)
1007 14 21468 if ($inside_heredoc)
1008 0 14 if ($input_source_code_line eq $open_quote_heredoc)
1012 1440 20028 if ($input_source_code_line =~ /^\s*$/msx)
1013 3200 16828 if ($input_source_code_line =~ /^\s*[#][^#!]/msx)
1014 0 16828 if ($input_source_code_line =~ /^=\w+/msx)
1025 16828 508861 if ($inside_indent and not $current_character =~ /[ \t]/msx)
1030 3204 522485 if ($advance_one)
1035 469341 53144 if (not $inside_string) { }
1036 4274 465067 if ($current_character eq '#') { }
2550 462517 elsif ($current_character eq q[']) { }
1854 460663 elsif ($current_character eq '"') { }
4602 456061 elsif ($current_character eq 'q') { }
148 455913 elsif ($current_character eq '<') { }
51679 414554 elsif (not $inside_indent and $current_character =~ /[ \t]/msx) { }
1038 3028 1246 if ($next_character eq '!' or $next_character eq '#') { }
1051 176 4426 if ($next_character eq '{')
1059 2 146 if ($next_character eq '<')
1062 0 2 if (substr($open_quote_heredoc, 0, 1) eq q['])
1063 0 2 if (substr($open_quote_heredoc, 0, 1) eq '"')
1065 2 0 if (substr($open_quote_heredoc, -1, 1) eq ';')
1067 0 2 if (substr($open_quote_heredoc, -1, 1) eq q['])
1068 0 2 if (substr($open_quote_heredoc, -1, 1) eq '"')
1075 4501 47178 if ($next_character =~ /[ \t]/msx)
1079 2546 50598 if ($current_character eq q['] and $open_quote_string eq q[']) { }
1854 48744 elsif ($current_character eq '"' and $open_quote_string eq '"') { }
176 97102 elsif ($current_character eq '}' and $open_quote_string eq 'q{') { }
1107 0 1226 if ($inside_comment)
1108 0 0 if ($input_source_code_line =~ m[\*/]msx) { }
1114 597 629 if ($input_source_code_line =~ /^\s*$/msx)
1115 95 534 if ($input_source_code_line =~ m[^\s*//]msx)
1116 0 534 if ($input_source_code_line =~ m[^\s*/\*.*\*/\s*$]msx)
1127 4 21770 if ($advance_one)
1132 19752 2018 if (not $inside_string) { }
1133 0 19752 if ($inside_comment) { }
1134 0 0 if ($current_character eq '*') { }
1136 0 0 if ($next_character eq '/')
1147 0 19752 if ($current_character eq '/') { }
0 19752 elsif ($current_character eq q[']) { }
146 19606 elsif ($current_character eq '"') { }
1149 0 0 if ($next_character eq '/') { }
0 0 elsif ($next_character eq '*') { }
1175 0 2018 if ($current_character eq q['] and $open_quote eq q[']) { }
146 1872 elsif ($current_character eq '"' and $open_quote eq '"') { }
10 1862 elsif ($current_character eq '\\') { }
1181 0 10 if ($next_character eq q['] and $open_quote eq q['])
1182 4 6 if ($next_character eq '"' and $open_quote eq '"')
1203 0 7971 if ($RPerl::Compiler::OSNAME eq 'MSWin32')
1212 2572 5399 if (substr($input_path, 0, length $current_working_directory) eq $current_working_directory)
1225 0 1418 if ($RPerl::Compiler::OSNAME eq 'MSWin32')
1230 0 1418 if (substr($input_path, 0, 2) eq './')
1246 0 0 unless ($cpp_file_path =~ m[/])
1247 0 0 if ($RPerl::Compiler::OSNAME eq 'MSWin32') { }
1256 0 0 if ($modes->{'subcompile'} eq 'DYNAMIC')
1257 0 0 if (exists $source_group->{'PMC'} and defined $source_group->{'PMC'} and $source_group->{'PMC'} ne '')
1288 0 0 if ($module_count == 1) { }
1292 0 0 if ($i == $module_count - 1) { }
1305 0 0 unless (-f $module_pmc_filename_manual)
1311 0 0 unless open my filehandleref $FILE_HANDLE, '<', $module_pmc_filename_manual
1329 0 0 if ($file_line eq "# <<< OO PROPERTIES, ACCESSORS & MUTATORS, SHIMS >>> # <<< CHANGE_ME: add real shims after this line or delete it >>>\n") { }
0 0 elsif ($file_line eq "# <<< OO PROPERTIES, SUBROUTINES, SHIMS >>> # <<< CHANGE_ME: add real shims after this line or delete it >>>\n") { }
0 0 elsif ($file_line eq "# <<< CHANGE_ME: add distribution-specific config include here >>>\n") { }
0 0 elsif ($file_line eq "# <<< CHANGE_ME: add user-defined includes here >>>\n") { }
0 0 elsif ($file_line eq " # <<< CHANGE_ME: enable optional SSE support here >>>\n") { }
0 0 elsif ($file_line eq " # <<< CHANGE_ME: enable optional GMP support here >>>\n") { }
0 0 elsif ($file_line eq " # <<< CHANGE_ME: enable optional GSL support here >>>\n") { }
1332 0 0 if (exists $source_group->{'_PMC_accessors_mutators_shims'}{$module_name_underscores} and defined $source_group->{'_PMC_accessors_mutators_shims'}{$module_name_underscores}) { }
1343 0 0 if (exists $source_group->{'_PMC_subroutines_shims'}{$module_name_underscores} and defined $source_group->{'_PMC_subroutines_shims'}{$module_name_underscores}) { }
1355 0 0 if (exists $source_group->{'_PMC_includes'}{$module_name_underscores} and defined $source_group->{'_PMC_includes'}{$module_name_underscores}) { }
1365 0 0 if (exists $modes->{'_enable_sse'} and defined $modes->{'_enable_sse'} and exists $modes->{'_enable_sse'}{$pm_file_path} and defined $modes->{'_enable_sse'}{$pm_file_path} and $modes->{'_enable_sse'}{$pm_file_path}) { }
1382 0 0 if (exists $modes->{'_enable_gmp'} and defined $modes->{'_enable_gmp'} and exists $modes->{'_enable_gmp'}{$pm_file_path} and defined $modes->{'_enable_gmp'}{$pm_file_path} and $modes->{'_enable_gmp'}{$pm_file_path}) { }
1402 0 0 if (exists $modes->{'_enable_gsl'} and defined $modes->{'_enable_gsl'} and exists $modes->{'_enable_gsl'}{$pm_file_path} and defined $modes->{'_enable_gsl'}{$pm_file_path} and $modes->{'_enable_gsl'}{$pm_file_path}) { }
1418 0 0 if (defined $file_line)
1421 0 0 unless close $FILE_HANDLE
1457 0 0 unless (defined $polycc_path)
1502 0 0 if ($polycc_command_stdout_content or $polycc_command_stderr_content)
1504 0 0 if ($polycc_command_stdout_content)
1507 0 0 if ($polycc_command_stderr_content)
1516 0 0 if ($test_exit_status)
1517 0 0 unless ($polycc_command_stdout_content or $polycc_command_stderr_content)
1527 0 0 unless (-e $cpp_output_file_name_group->{'OPENMP_CPP'} and -f $cpp_output_file_name_group->{'OPENMP_CPP'} and -T $cpp_output_file_name_group->{'OPENMP_CPP'})
1532 0 0 unless open my filehandleref $FILE_HANDLE_POLYCC, '<', $cpp_output_file_name_group->{'OPENMP_CPP'}
1544 0 0 unless close $FILE_HANDLE_POLYCC
1547 0 0 unless open $FILE_HANDLE_POLYCC, '>', $cpp_output_file_name_group->{'OPENMP_CPP'}
1552 0 0 unless close $FILE_HANDLE_POLYCC
1564 0 0 if ($modes->{'_input_file_name'} =~ /[.]pl$/msx or $modes->{'subcompile'} ne 'DYNAMIC') { }
1567 0 0 if ($modes->{'subcompile'} eq 'OFF') { }
0 0 elsif ($modes->{'subcompile'} ne 'ASSEMBLE' and $modes->{'subcompile'} ne 'ARCHIVE' and $modes->{'subcompile'} ne 'SHARED' and $modes->{'subcompile'} ne 'STATIC' and $modes->{'subcompile'} ne 'DYNAMIC') { }
1583 0 0 if ($modes->{'subcompile'} eq 'ASSEMBLE' or $modes->{'subcompile'} eq 'ARCHIVE') { }
0 0 elsif ($modes->{'subcompile'} eq 'STATIC' or $modes->{'subcompile'} eq 'DYNAMIC') { }
1628 0 0 if ($RPerl::CORE_PATH eq '')
1636 0 0 if ($modes->{'parallel'} eq 'OFF') { }
0 0 elsif ($modes->{'parallel'} eq 'OPENMP') { }
1640 0 0 if ($modes->{'subcompile'} eq 'ASSEMBLE' or $modes->{'subcompile'} eq 'ARCHIVE') { }
0 0 elsif ($modes->{'subcompile'} eq 'SHARED') { }
0 0 elsif ($modes->{'subcompile'} eq 'STATIC' or $modes->{'subcompile'} eq 'DYNAMIC') { }
1660 0 0 if ($modes->{'subcompile'} eq 'STATIC' or $modes->{'subcompile'} eq 'DYNAMIC')
1667 0 0 if ($modes->{'subcompile'} eq 'SHARED') { }
0 0 elsif ($modes->{'subcompile'} eq 'STATIC') { }
1674 0 0 if ($modes->{'subcompile'} eq 'STATIC' or $modes->{'subcompile'} eq 'DYNAMIC')
1677 0 0 if ($modes->{'parallel'} eq 'OPENMP')
1685 0 0 if ($modes->{'subcompile'} eq 'STATIC')
1689 0 0 if ($modes->{'subcompile'} eq 'ARCHIVE')
1693 0 0 if ($RPerl::Compiler::OSNAME eq 'MSWin32') { }
1710 0 0 if ($ENV{'RPERL_VERBOSE'} or $RPerl::VERBOSE)
1733 0 0 if ($modes->{'subcompile'} eq 'ARCHIVE')
1734 0 0 if (-f $cpp_output_file_name_group->{'O'})
1738 0 0 unless unlink $cpp_output_file_name_group->{'O'}
1749 0 0 if ($subcompile_command_stdout_content or $subcompile_command_stderr_content)
1751 0 0 if ($subcompile_command_stdout_content)
1754 0 0 if ($subcompile_command_stderr_content)
1757 0 0 if ($test_exit_status == 0)
1765 0 0 if ($test_exit_status)
1766 0 0 unless ($subcompile_command_stdout_content or $subcompile_command_stderr_content)
1783 0 0 if (length $directories_pmc > 1 and substr($directories_pmc, -1, 1) eq '/' || substr($directories_pmc, -1, 1) eq '\\')
1798 0 0 if ($directories_pmc =~ /^$INC_directory/)
1813 0 0 if ($directory ne '.' and $directory ne '')