"Fossies" - the Fresh Open Source Software Archive

Member "RPerl-5.002000/script/rperl" (29 Nov 2019, 73345 Bytes) of package /linux/misc/RPerl-5.002000.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "rperl": 5.000000_vs_5.002000.

    1 #!/usr/bin/env perl
    2 # [[[ HEADER ]]]
    3 use strict;
    4 use warnings;
    5 use RPerl;
    6 use RPerl;
    7 #use RPerl::AfterSubclass;
    8 
    9 # DEV NOTE, CORRELATION #rp016: CPAN's underscore-is-beta (NOT RPerl's underscore-is-comma) numbering scheme utilized here, to preserve trailing zeros
   10 our $VERSION = '5.002000';
   11 
   12 #our $VERSION = 20191128;    # NON-RELEASE VERSION NUMBER, OFFICIAL LONGDATE
   13 #our $VERSION = 2019.332;    # NON-RELEASE VERSION NUMBER, OFFICIAL STARDATE
   14 
   15 # [[[ CRITICS ]]]
   16 ## no critic qw(ProhibitUselessNoCritic ProhibitMagicNumbers RequireCheckedSyscalls)  # USER DEFAULT 1: allow numeric values & print operator
   17 ## no critic qw(ProhibitExplicitStdin)  # USER DEFAULT 4: allow <STDIN>
   18 ## no critic qw(RequireInterpolationOfMetachars)  # USER DEFAULT 2: allow single-quoted control characters & sigils
   19 ## no critic qw(ProhibitBooleanGrep)  # SYSTEM SPECIAL 1: allow grep
   20 ## no critic qw(RequireCarping)  # SYSTEM SPECIAL 13: allow die instead of croak
   21 
   22 # [[[ INCLUDES ]]]
   23 use RPerl::Parser;    # includes Perl::Critic
   24 use RPerl::Generator;
   25 use RPerl::Compiler;    # includes Inline
   26 use RPerl::DataType::Number;  # number_to_string()
   27 use rperloptions;
   28 use Getopt::Long qw(:config no_ignore_case);
   29 use Pod::Usage;
   30 use File::Path qw(remove_tree);
   31 use Config qw(config_re);
   32 
   33 # [[[ SUBROUTINES ]]]
   34 
   35 # [[[ ACCEPT, CHECK, REPORT COMMAND-LINE ARGUMENTS (aka OPTIONS)) ]]]
   36 # [[[ ACCEPT, CHECK, REPORT COMMAND-LINE ARGUMENTS (aka OPTIONS)) ]]]
   37 # [[[ ACCEPT, CHECK, REPORT COMMAND-LINE ARGUMENTS (aka OPTIONS)) ]]]
   38 
   39 sub accept_and_verify_input_files {
   40     ( my string_arrayref $input_file_names, my string_arrayref $input_file_names_unlabeled, my string_hashref $modes ) = @_;
   41 
   42     #    RPerl::diag( 'in rperl::accept_and_verify_input_files(), received $input_file_names = ' . Dumper($input_file_names) . "\n" );
   43     #    RPerl::diag( 'in rperl::accept_and_verify_input_files(), received $input_file_names_unlabeled = ' . Dumper($input_file_names_unlabeled) . "\n" );
   44 
   45     RPerl::diag("\n\n");    # move output away from initial Inline compiler output
   46     RPerl::diag( 'in rperl, have $RPerl::DEBUG   = ' . $RPerl::DEBUG   . ', $ENV{RPERL_DEBUG}   = ' . ($ENV{RPERL_DEBUG} || '<NOT SET>') . "\n" );
   47     RPerl::diag( 'in rperl, have $RPerl::VERBOSE = ' . $RPerl::VERBOSE . ', $ENV{RPERL_VERBOSE} = ' . ($ENV{RPERL_VERBOSE} || '<NOT SET>') . "\n" );
   48 
   49     # accept unlabeled input file name(s) if no labeled values specified
   50     if ( ( scalar @{$input_file_names_unlabeled} ) > 0 ) {
   51         if ( ( scalar @{$input_file_names} ) == 0 ) {
   52             $input_file_names = $input_file_names_unlabeled;
   53         }
   54         else {
   55             die 'ERROR EAR08: Both labeled & unlabeled RPerl source code input file argument(s) specified, dying' . "\n";
   56         }
   57     }
   58 
   59     if ( ( scalar @{$input_file_names} ) == 0 ) {
   60         die 'ERROR EAR01: No RPerl source code input file(s) specified, dying' . "\n";
   61 #        print {*STDERR} 'ERROR EAR01: No RPerl source code input file(s) specified, aborting' . "\n";
   62 #        return $input_file_names;  # allow require of this file
   63     }
   64 
   65     # verify input file(s)
   66     my $input_files_count = scalar @{$input_file_names};
   67 
   68     # DEV NOTE: Perl::Critic BUG!  'integer' triggers false positive RequireFinalReturn
   69     #    for my integer $i ( 0 .. ( $input_files_count - 1 ) ) {
   70     for my $i ( 0 .. ( $input_files_count - 1 ) ) {
   71         my string $input_file_name = $input_file_names->[$i];
   72 
   73 #    RPerl::diag('in rperl, top of file verifying loop ' . $i . ' of ' . $input_files_count . ", have \$input_file_names->[$i] = '" . $input_file_name . "'\n");
   74 
   75         if ( $input_file_name =~ m/\s/xms ) {
   76 
   77 #            RPerl::diag('in rperl, in file verifying loop ' . $i . ' of ' . $input_files_count . ", have \$input_file_name with spaces = '" . $input_file_name . "'\n");
   78             my string_arrayref $input_file_name_and_args = [ split /[ ]/xms, $input_file_name ];
   79 
   80 #            RPerl::diag('in rperl, in file verifying loop ' . $i . ' of ' . $input_files_count . ", have \$input_file_name_and_args = '" . Dumper($input_file_name_and_args) . "'\n");
   81             $input_file_name = shift @{$input_file_name_and_args};
   82             $input_file_names->[$i] = $input_file_name;
   83 
   84    #            RPerl::diag('in rperl, in file verifying loop ' . $i . ' of ' . $input_files_count . ", have \$input_file_name = '" . $input_file_name . "'\n");
   85             $modes->{arguments} = $input_file_name_and_args;
   86 
   87             #            RPerl::diag('in rperl, in file verifying loop ' . $i . ' of ' . $input_files_count . ", have \$modes = '" . Dumper($modes) . "'\n");
   88         }
   89 
   90         if ( not( -e $input_file_name ) ) {    ## no critic qw(ProhibitCascadingIfElse)  # SYSTEM DEFAULT 2: allow argument-handling logic
   91             die 'ERROR EAR02: Specified RPerl source code input file ' . q{'} . $input_file_name . q{'} . ' does not exist, dying' . "\n";
   92         }
   93         elsif ( not( -r $input_file_name ) ) {
   94             die 'ERROR EAR03: Specified RPerl source code input file ' . q{'} . $input_file_name . q{'} . ' is not readable, dying' . "\n";
   95         }
   96         elsif ( not( -f $input_file_name ) ) {
   97             die 'ERROR EAR04: Specified RPerl source code input file ' . q{'} . $input_file_name . q{'} . ' is not a plain file, dying' . "\n";
   98         }
   99         elsif ( ( $input_file_name !~ /[.]pm$/xms )
  100             and ( $input_file_name !~ /[.]pl$/xms ) )
  101         {
  102             die 'ERROR EAR05: Specified RPerl source code input file ' . q{'}
  103                 . $input_file_name . q{'}
  104                 . ' is not a Perl program ending in ' . q{'} . '.pl' . q{'}
  105                 . ' or module ending in  ' . q{'} . '.pm' . q{'}
  106                 . ', dying' . "\n";
  107         }
  108 
  109         # DEV NOTE, CORRELATION #rp036: handle input file names with leading dots
  110         # strip leading './' dot-slash and '.\' dot-backslash "current directory" paths;
  111         while (((substr $input_file_name, 0, 2) eq q{./}) or ((substr $input_file_name, 0, 2) eq q{.\\})) {
  112 #            RPerl::diag( 'in rperl::accept_and_verify_input_files(), stripping leading dot-slash or dot-backslash, have BEFORE $input_file_name = ' . q{'} . $input_file_name . q{'} . "\n" );
  113             substr $input_file_name, 0, 2, q{};
  114 #            RPerl::diag( 'in rperl::accept_and_verify_input_files(), stripping leading dot-slash or dot-backslash, have AFTER $input_file_name = ' . q{'} . $input_file_name . q{'} . "\n" );
  115             $input_file_names->[$i] = $input_file_name;
  116         }
  117     }
  118     return $input_file_names;
  119 }
  120 
  121 sub verify_and_default_modes {
  122     (   my string_hashref $modes,
  123         my string_hashref $modes_default,
  124         my arrayref_hashref $modes_supported,
  125         my integer $magic_low_flag,
  126         my integer $magic_medium_flag,
  127         my integer $magic_high_flag,
  128         my integer $dependencies_flag,
  129         my integer $uncompile_flag,
  130         my integer $compile_flag,
  131         my integer $subcompile_assemble_flag,
  132         my integer $subcompile_archive_flag,
  133         my integer $subcompile_shared_flag,
  134         my integer $subcompile_static_flag,
  135         my integer $subcompile_CXX,
  136         my integer $parallel_flag,
  137         my integer $num_cores,
  138         my integer $execute_flag,
  139         my integer $test_flag,
  140         my string_arrayref $input_file_names
  141     ) = @_;
  142 
  143     if ( defined $dependencies_flag ) {
  144         if ($dependencies_flag) {
  145             $modes->{dependencies} = 'ON';
  146         }
  147         else {
  148             $modes->{dependencies} = 'OFF';
  149         }
  150     }
  151 
  152     if ( defined $magic_low_flag ) {
  153         if ( $magic_low_flag ) {
  154             if ( ( defined $magic_medium_flag ) and $magic_medium_flag ) {
  155                 die 'ERROR EAR18: Incompatible command-line argument flags provided, both --low and --medium, dying' . "\n";
  156             }
  157             if ( ( defined $magic_high_flag ) and $magic_high_flag ) {
  158                 die 'ERROR EAR18: Incompatible command-line argument flags provided, both --low and --high, dying' . "\n";
  159             }
  160             $modes->{magic} = 'LOW';
  161         }
  162     }
  163 
  164     if ( defined $magic_medium_flag ) {
  165         if ( $magic_medium_flag ) {
  166             if ( ( defined $magic_high_flag ) and $magic_high_flag ) {
  167                 die 'ERROR EAR19: Incompatible command-line argument flags provided, both --medium and --high, dying' . "\n";
  168             }
  169             $modes->{magic} = 'MEDIUM';
  170         }
  171     }
  172 
  173     if ( defined $magic_high_flag ) {
  174         if ( $magic_high_flag ) {
  175             $modes->{magic} = 'HIGH';
  176         }
  177     }
  178 
  179     if ( defined $uncompile_flag ) {
  180         if ($uncompile_flag) {
  181             if ( ( defined $compile_flag ) and $compile_flag ) {
  182                 die 'ERROR EAR09: Incompatible command-line argument flags provided, both --uncompile and --compile, dying' . "\n";
  183             }
  184             # subcompile mode is used in Compiler::generate_output_file_names() to determine which files to delete, allow flags to set subcompile mode
  185 #            if ( ( defined $subcompile_assemble_flag ) and $subcompile_assemble_flag ) {
  186 #                die 'ERROR EAR09: Incompatible command-line argument flags provided, both --uncompile and --assemble, dying' . "\n";
  187 #            }
  188 #            if ( ( defined $subcompile_archive_flag ) and $subcompile_archive_flag ) {
  189 #                die 'ERROR EAR09: Incompatible command-line argument flags provided, both --uncompile and --archive, dying' . "\n";
  190 #            }
  191 #            if ( ( defined $subcompile_shared_flag ) and $subcompile_shared_flag ) {
  192 #                die 'ERROR EAR09: Incompatible command-line argument flags provided, both --uncompile and --shared, dying' . "\n";
  193 #            }
  194 #            if ( ( defined $subcompile_static_flag ) and $subcompile_static_flag ) {
  195 #                die 'ERROR EAR09: Incompatible command-line argument flags provided, both --uncompile and --static, dying' . "\n";
  196 #            }
  197             if ( ( defined $execute_flag ) and $execute_flag ) {
  198                 die 'ERROR EAR09: Incompatible command-line argument flags provided, both --uncompile and --execute, dying' . "\n";
  199             }
  200             if ( ( defined $test_flag ) and $test_flag ) {
  201                 die 'ERROR EAR09: Incompatible command-line argument flags provided, both --uncompile and --test, dying' . "\n";
  202             }
  203             if ($uncompile_flag == 1) { $modes->{uncompile} = 'SOURCE'; }
  204             if ($uncompile_flag == 2) { $modes->{uncompile} = 'SOURCE_BINARY'; }
  205             if ($uncompile_flag == 3) { $modes->{uncompile} = 'SOURCE_BINARY_INLINE'; }
  206             # subcompile mode is used in Compiler::generate_output_file_names() to determine which files to delete,
  207             # leave compile mode in tact to leave subcompile mode in tact from "can't subcompile if we don't subcompile" at bottom of this subroutine
  208 #            $modes->{compile}   = 'OFF';
  209             $modes->{execute}   = 'OFF';
  210         }
  211         else {
  212             $modes->{uncompile} = 'OFF';
  213         }
  214     }
  215 
  216     if ( defined $compile_flag ) {
  217         if ($compile_flag) {
  218             $modes->{compile} = 'SUBCOMPILE';  # already default, does nothing
  219         }
  220         else {    # --nocompile command-line argument disables SAVE & SUBCOMPILE steps, PARSE & GENERATE remain enabled
  221             if (( defined $subcompile_assemble_flag ) and $subcompile_assemble_flag ) {
  222                 die 'ERROR EAR10: Incompatible command-line argument flags provided, both --nocompile and --assemble, dying' . "\n";
  223             }
  224             if ( ( defined $subcompile_archive_flag ) and $subcompile_archive_flag ) {
  225                 die 'ERROR EAR10: Incompatible command-line argument flags provided, both --nocompile and --archive, dying' . "\n";
  226             }
  227             if ( ( defined $subcompile_shared_flag ) and $subcompile_shared_flag ) {
  228                 die 'ERROR EAR10: Incompatible command-line argument flags provided, both --nocompile and --shared, dying' . "\n";
  229             }
  230             if ( ( defined $subcompile_static_flag ) and $subcompile_static_flag ) {
  231                 die 'ERROR EAR10: Incompatible command-line argument flags provided, both --nocompile and --static, dying' . "\n";
  232             }
  233             $modes->{compile} = 'GENERATE';
  234         }
  235     }
  236 
  237     # assemble mode is CPPOPS_CPPTYPES_SUBCOMPILE_ASSEMBLE; flag ignored if false
  238     if (( defined $subcompile_assemble_flag ) and $subcompile_assemble_flag ) {
  239         if ( ( defined $subcompile_archive_flag ) and $subcompile_archive_flag ) {
  240             die 'ERROR EAR11: Incompatible command-line argument flags provided, both --assemble and --archive, dying' . "\n";
  241         }
  242         if ( ( defined $subcompile_shared_flag ) and $subcompile_shared_flag ) {
  243             die 'ERROR EAR11: Incompatible command-line argument flags provided, both --assemble and --shared, dying' . "\n";
  244         }
  245         if ( ( defined $subcompile_static_flag ) and $subcompile_static_flag ) {
  246             die 'ERROR EAR11: Incompatible command-line argument flags provided, both --assemble and --static, dying' . "\n";
  247         }
  248         if ( ( defined $execute_flag ) and $execute_flag ) {
  249             die 'ERROR EAR11: Incompatible command-line argument flags provided, both --assemble and --execute, dying' . "\n";
  250         }
  251         if ( ( defined $test_flag ) and $test_flag ) {
  252             die 'ERROR EAR11: Incompatible command-line argument flags provided, both --assemble and --test, dying' . "\n";
  253         }
  254         $modes->{compile}   = 'SUBCOMPILE';
  255         $modes->{subcompile} = 'ASSEMBLE';
  256         $modes->{execute}   = 'OFF';
  257     }
  258 
  259     # archive mode is CPPOPS_CPPTYPES_SUBCOMPILE_ARCHIVE; flag ignored if false
  260     if (( defined $subcompile_archive_flag ) and $subcompile_archive_flag ) {
  261         if ( ( defined $subcompile_shared_flag ) and $subcompile_shared_flag ) {
  262             die 'ERROR EAR12: Incompatible command-line argument flags provided, both --archive and --shared, dying' . "\n";
  263         }
  264         if ( ( defined $subcompile_static_flag ) and $subcompile_static_flag ) {
  265             die 'ERROR EAR12: Incompatible command-line argument flags provided, both --archive and --static, dying' . "\n";
  266         }
  267         if ( ( defined $execute_flag ) and $execute_flag ) {
  268             die 'ERROR EAR12: Incompatible command-line argument flags provided, both --archive and --execute, dying' . "\n";
  269         }
  270         if ( ( defined $test_flag ) and $test_flag ) {
  271             die 'ERROR EAR12: Incompatible command-line argument flags provided, both --archive and --test, dying' . "\n";
  272         }
  273         $modes->{compile}   = 'SUBCOMPILE';
  274         $modes->{subcompile} = 'ARCHIVE';
  275         $modes->{execute}   = 'OFF';
  276     }
  277 
  278     # shared mode is CPPOPS_CPPTYPES_SUBCOMPILE_SHARED; flag ignored if false
  279     if (( defined $subcompile_shared_flag ) and $subcompile_shared_flag ) {
  280         if ( ( defined $subcompile_static_flag ) and $subcompile_static_flag ) {
  281             die 'ERROR EAR13: Incompatible command-line argument flags provided, both --shared and --static, dying' . "\n";
  282         }
  283         if ( ( defined $execute_flag ) and $execute_flag ) {
  284             die 'ERROR EAR13: Incompatible command-line argument flags provided, both --shared and --execute, dying' . "\n";
  285         }
  286         if ( ( defined $test_flag ) and $test_flag ) {
  287             die 'ERROR EAR13: Incompatible command-line argument flags provided, both --shared and --test, dying' . "\n";
  288         }
  289         $modes->{compile}   = 'SUBCOMPILE';
  290         $modes->{subcompile} = 'SHARED';
  291         $modes->{execute}   = 'OFF';
  292     }
  293 
  294     # static mode is CPPOPS_CPPTYPES_SUBCOMPILE_STATIC; negated is dynamic mode is CPPOPS_CPPTYPES_SUBCOMPILE_DYNAMIC
  295     if (( defined $subcompile_static_flag ) and $subcompile_static_flag ) {
  296         if ($subcompile_static_flag) {
  297             if ( ( defined $test_flag ) and $test_flag ) {
  298                 die 'ERROR EAR14: Incompatible command-line argument flags provided, both --static and --test, dying' . "\n";
  299             }
  300             foreach my string $input_file_name (@{$input_file_names}) {
  301                 if ( $input_file_name =~ /[.]pm$/xms ) {
  302                     die 'ERROR EAR15: Incompatible command-line arguments provided, both --static subcompile mode flag and *.pm Perl module input file(s), dying' . "\n";
  303                 }
  304             }
  305             $modes->{compile}   = 'SUBCOMPILE';
  306             $modes->{subcompile} = 'STATIC';
  307         }
  308         else {
  309             $modes->{compile}   = 'SUBCOMPILE';
  310             $modes->{subcompile} = 'DYNAMIC';
  311         }
  312     }
  313     
  314     if (defined $subcompile_CXX) {
  315         if ($subcompile_CXX =~ m/^\s*$/gxms) {
  316             die 'ERROR EAR16: Undefined, empty, or all-whitespace CXX command-line argument provided, dying' . "\n";
  317         }
  318         else {
  319             $modes->{CXX} = $subcompile_CXX;
  320         }
  321     }
  322 
  323     if ( defined $parallel_flag ) {
  324         if ($parallel_flag) {
  325             $modes->{parallel} = 'OPENMP';
  326         }
  327         else {
  328             $modes->{parallel} = 'OFF';
  329         }
  330     }
  331     
  332     if (defined $num_cores) {
  333         if ($num_cores =~ m/^\s*$/gxms) {
  334             die 'ERROR EAR17: Undefined, empty, or all-whitespace CXX command-line argument provided, dying' . "\n";
  335         }
  336         else {
  337             $modes->{num_cores} = $num_cores;
  338         }
  339     }
  340 
  341     if ( defined $execute_flag ) {
  342         if ($execute_flag) {
  343             $modes->{execute} = 'ON';
  344         }
  345         else {
  346             $modes->{execute} = 'OFF';
  347         }
  348     }
  349 
  350     # test mode is PERLOPS_PERLTYPES_GENERATE, do not save files to disk; test mode flag ignored if false
  351     if (( defined $test_flag ) and $test_flag ) {
  352         $modes->{ops}     = 'PERL';
  353         $modes->{types}   = 'PERL';
  354         $modes->{compile} = 'GENERATE';
  355     }
  356 
  357     # must put Perl variables into environmental variables for the values to be properly utilized,
  358     # do not simply overwrite values, check for applicability first
  359 
  360     # DEV NOTE, CORRELATION #rp017: default to off; if either variable is set to true, then do emit messages
  361     if ($RPerl::DEBUG) {
  362         $ENV{RPERL_DEBUG} = $RPerl::DEBUG;
  363     }
  364     if ($RPerl::VERBOSE) {
  365         $ENV{RPERL_VERBOSE} = $RPerl::VERBOSE;
  366     }
  367 
  368     # verify modes
  369     foreach my string $mode_key ( keys %{$modes} ) {
  370         if ( not( exists $modes_supported->{$mode_key} ) ) {
  371             die "ERROR EAR06: Unsupported or invalid mode category '$mode_key' specified, supported categories are ("
  372                 . join( ', ', sort keys %{$modes_supported} )
  373                 . '), dying' . "\n";
  374         }
  375         elsif ( ( defined $modes_supported->{$mode_key} ) and not( grep { $_ eq $modes->{$mode_key} } @{ $modes_supported->{$mode_key} } ) ) {
  376             die 'ERROR EAR07: Unsupported or invalid mode ' . q{'}
  377                 . $modes->{$mode_key} . q{'}
  378                 . ' in mode category ' . q{'}
  379                 . $mode_key . q{'}
  380                 . ' specified, supported modes are ('
  381                 . join( ', ', sort @{ $modes_supported->{$mode_key} } )
  382                 . '), dying' . "\n";
  383         }
  384     }
  385 
  386     # initialize empty symbol table, to be populated during GENERATE phase
  387 #    $modes->{_symbol_table} = { _namespace => 'main::', _subroutine => q{} };  # NEED REMOVE, DEPRECATED
  388     $modes->{_symbol_table} = { _namespace => q{}, _subroutine => q{} };
  389 
  390     # defaults when mode(s) not provided
  391     foreach my string $mode_default_key ( keys %{$modes_default} ) { ## no critic qw(ProhibitPostfixControls)  # SYSTEM SPECIAL 6: PERL CRITIC FILED ISSUE #639, not postfix foreach or if
  392         if ( not( exists $modes->{$mode_default_key} ) ) {
  393             $modes->{$mode_default_key} = $modes_default->{$mode_default_key};
  394         }
  395     }
  396 
  397     # can't subcompile if we don't subcompile
  398     if ($modes->{compile} ne 'SUBCOMPILE') {
  399         $modes->{subcompile} = 'OFF';
  400     }
  401 
  402     1;    # DEV NOTE: Perl::Critic BUG!  must have this '1;' to avoid false positive ProhibitPostfixControls & RequireFinalReturn
  403 
  404     return $modes;
  405 }
  406 
  407 sub verbose_versions {
  408     RPerl::verbose( 'RPERL VERBOSE VERSIONS & OTHER CONFIG INFO' . "\n\n" );
  409 
  410     RPerl::verbose( q{$RPerl::VERSION using  CPAN's underscore-is-beta  numbering scheme    } . $RPerl::VERSION . "\n" );
  411     RPerl::verbose( q{$RPerl::VERSION using RPerl's underscore-is-comma numbering scheme    } . RPerl::DataType::Number::number_to_string(RPerl::DataType::String::string_to_number($RPerl::VERSION)) . "\n" );
  412     RPerl::verbose( q{ rperl $VERSION using  CPAN's underscore-is-beta  numbering scheme    } . $VERSION . "\n" );
  413     RPerl::verbose( q{ rperl $VERSION using RPerl's underscore-is-comma numbering scheme    } . RPerl::DataType::Number::number_to_string(RPerl::DataType::String::string_to_number($VERSION)) . "\n\n" );
  414 
  415     my string $ccflags = [ config_re('ccflags') ]->[0];
  416     substr $ccflags, 0,  9, q{};                 # remove leading ccflags='
  417     substr $ccflags, -1, 1, q{};                 # remove trailing '
  418     RPerl::verbose(q{  Perl config_re('ccflags')       } . $ccflags . "\n" );
  419     
  420     my string $cccdlflags = [ config_re('cccdlflags') ]->[0];
  421     substr $cccdlflags, 0,  12, q{};                                             # remove leading cccdlflags='
  422     substr $cccdlflags, -1, 1,  q{};                                             # remove trailing '
  423     RPerl::verbose(q{  Perl config_re('cccdlflags')    } . $cccdlflags . "\n" );
  424 
  425     RPerl::verbose( '$RPerl::Inline::CCFLAGSEX         ' . $RPerl::Inline::CCFLAGSEX . "\n" );
  426     RPerl::verbose( '$RPerl::Inline::ARGS{optimize}    ' . $RPerl::Inline::ARGS{optimize} . "\n\n" );
  427 
  428     RPerl::verbose( '$RPerl::CHECK           ' . $RPerl::CHECK . "\n" );
  429     RPerl::verbose( '$RPerl::DEBUG           ' . $RPerl::DEBUG . "\n" );
  430     RPerl::verbose( '$ENV{RPERL_DEBUG}       ' . ($ENV{RPERL_DEBUG} or '[ NOT SET ]') . "\n" );
  431     RPerl::verbose( '$RPerl::VERBOSE         ' . $RPerl::VERBOSE . "\n" );
  432     RPerl::verbose( '$ENV{RPERL_VERBOSE}     ' . ($ENV{RPERL_VERBOSE} or '[ NOT SET ]') . "\n" );
  433     RPerl::verbose( '$RPerl::WARNINGS        ' . $RPerl::WARNINGS . "\n" );
  434     RPerl::verbose( '$ENV{RPERL_WARNINGS}    ' . ($ENV{RPERL_WARNINGS} or '[ NOT SET ]') . "\n" );
  435     RPerl::verbose( '$RPerl::TYPES_CCFLAG    ' . $RPerl::TYPES_CCFLAG . '  [ HARD-CODED DEFAULT ]' . "\n" );
  436     RPerl::verbose( '$RPerl::BASE_PATH       ' . $RPerl::BASE_PATH . "\n" );
  437     RPerl::verbose( '$RPerl::INCLUDE_PATH    ' . $RPerl::INCLUDE_PATH . "\n" );
  438     RPerl::verbose( '$RPerl::SCRIPT_PATH     ' . $RPerl::SCRIPT_PATH . "\n" );
  439     RPerl::verbose( '$RPerl::CORE_PATH       ' . $RPerl::CORE_PATH . "\n" );
  440 
  441 #    RPerl::verbose( 'FOOOOOO' . "\n    " . $BAAAAAAR . "\n" );
  442     return;
  443 }
  444 
  445 sub verbose_multi_file_settings {
  446     ( my string_arrayref $input_file_names, my hashref_arrayref $output_file_name_groups, my integer $input_files_count, my hashref_hashref $filename_suffixes_supported, my string_hashref $modes ) = @_;
  447     if ( $input_files_count > 1 ) {
  448         RPerl::verbose( multi_file_settings( $input_file_names, $output_file_name_groups, $input_files_count, $filename_suffixes_supported, $modes ) );
  449         RPerl::verbose_pause( "\n" . 'PRESS <ENTER> TO CONTINUE' . "\n" );
  450     }
  451     return;
  452 }
  453 
  454 sub diag_multi_file_settings {
  455     ( my string_arrayref $input_file_names, my hashref_arrayref $output_file_name_groups, my integer $input_files_count, my hashref_hashref $filename_suffixes_supported, my string_hashref $modes ) = @_;
  456     if ( $input_files_count > 1 ) {
  457         RPerl::diag( multi_file_settings( $input_file_names, $output_file_name_groups, $input_files_count, $filename_suffixes_supported, $modes ) );
  458         RPerl::diag_pause( "\n" . 'PRESS <ENTER> TO CONTINUE' . "\n" );
  459     }
  460     return;
  461 }
  462 
  463 sub multi_file_settings {
  464     ( my string_arrayref $input_file_names, my hashref_arrayref $output_file_name_groups, my integer $input_files_count, my hashref_hashref $filename_suffixes_supported, my string_hashref $modes ) = @_;
  465     my string $retval = q{};
  466 
  467     $retval .= 'Input File(s):' . "\n";
  468     foreach my string $input_file_name ( @{$input_file_names} ) {
  469         $retval .= q{    } . $input_file_name . "\n";
  470     }
  471     $retval .= 'Output File(s):' . "\n";
  472     foreach my string_hashref $output_file_name_group ( @{$output_file_name_groups} ) {
  473         $retval .= q{    } . stringify_output_file_name_group($output_file_name_group, $filename_suffixes_supported) . "\n";
  474     }
  475     $retval .= 'Modes:' . "\n";
  476     foreach my string $mode_key ( sort keys %{$modes} ) {
  477         $retval .= q{    } . $mode_key . ' => ' . $modes->{$mode_key} . "\n";
  478     }
  479     return $retval;
  480 }
  481 
  482 # allow omission of "-infile" on command-line
  483 #our void $store_unlabeled_arguments = sub {  # NEED FIX: can't define RPerl-style subroutines here?
  484 sub store_unlabeled_arguments {
  485     ( my unknown $argument ) = @_;
  486     push @{$::input_file_names_unlabeled}, $argument;
  487     return;
  488 }
  489 
  490 # print value of argument flags
  491 sub verbose_flags {
  492         my integer $magic_low_flag,
  493         my integer $magic_medium_flag,
  494         my integer $magic_high_flag,
  495     (   my integer $dependencies_flag,
  496         my integer $uncompile_flag,
  497         my integer $compile_flag,
  498         my integer $subcompile_assemble_flag,
  499         my integer $subcompile_archive_flag,
  500         my integer $subcompile_shared_flag,
  501         my integer $subcompile_static_flag,
  502         my integer $parallel_flag,
  503         my integer $execute_flag,
  504         my integer $test_flag
  505     ) = @_;
  506 
  507     RPerl::verbose( 'Verbose Flag......... ' . $RPerl::VERBOSE . "\n" );
  508     RPerl::verbose( 'Debug Flag........... ' . $RPerl::DEBUG . "\n" );
  509     if ( defined $dependencies_flag ) {
  510         RPerl::verbose( 'Dependencies Flag.... ' . $dependencies_flag . "\n" );
  511     }
  512     if ( defined $magic_low_flag ) {
  513         RPerl::verbose( 'Low Magic Flag....... ' . $magic_low_flag . "\n" );
  514     }
  515     if ( defined $magic_medium_flag ) {
  516         RPerl::verbose( 'Medium Magic Flag.... ' . $magic_medium_flag . "\n" );
  517     }
  518     if ( defined $magic_high_flag ) {
  519         RPerl::verbose( 'High Magic Flag...... ' . $magic_high_flag . "\n" );
  520     }
  521     if ( defined $uncompile_flag ) {
  522         RPerl::verbose( 'Uncompile Flag....... ' . $uncompile_flag . "\n" );
  523     }
  524     if ( defined $compile_flag ) {
  525         RPerl::verbose( 'Compile Flag......... ' . $compile_flag . "\n" );
  526     }
  527     if ( defined $subcompile_archive_flag ) {
  528         RPerl::verbose( 'Archive Flag......... ' . $subcompile_archive_flag . "\n" );
  529     }
  530     if ( defined $subcompile_assemble_flag ) {
  531         RPerl::verbose( 'Assemble Flag........ ' . $subcompile_assemble_flag . "\n" );
  532     }
  533     if ( defined $subcompile_shared_flag ) {
  534         RPerl::verbose( 'Shared Flag.......... ' . $subcompile_shared_flag . "\n" );
  535     }
  536     if ( defined $subcompile_static_flag ) {
  537         RPerl::verbose( 'Static Flag.......... ' . $subcompile_static_flag . "\n" );
  538     }
  539     if ( defined $parallel_flag ) {
  540         RPerl::verbose( 'Parallel Flag........ ' . $parallel_flag . "\n" );
  541     }
  542     if ( defined $execute_flag ) {
  543         RPerl::verbose( 'Execute Flag......... ' . $execute_flag . "\n" );
  544     }
  545     if ( defined $test_flag ) {
  546         RPerl::verbose( 'Test Flag............ ' . $test_flag . "\n" );
  547     }
  548 }
  549 
  550 sub stringify_output_file_name_group {
  551     ( my string_hashref $output_file_name_group, my hashref_hashref $filename_suffixes_supported ) = @_;
  552 
  553     my string $output_file_names = q{};
  554     foreach my string $suffix_key (sort @{[keys %{$filename_suffixes_supported->{OUTPUT_SOURCE}}, keys %{$filename_suffixes_supported->{OUTPUT_BINARY}}]}) {
  555         if ( exists $output_file_name_group->{$suffix_key} ) {
  556             $output_file_names .= $output_file_name_group->{$suffix_key};
  557             if ( exists $output_file_name_group->{ '_' . $suffix_key . '_label' } ) {
  558                 $output_file_names .= $output_file_name_group->{ '_' . $suffix_key . '_label' };
  559             }
  560             $output_file_names .= q{  };
  561         }
  562     }
  563     if ( ( length $output_file_names ) > 55 ) {
  564         my @output_file_names_split = split q{  }, $output_file_names;
  565         my boolean $is_first = 1;
  566         foreach my string $output_file_name (@output_file_names_split) {
  567             if ($is_first) {
  568                 $output_file_names = $output_file_name;
  569                 $is_first          = 0;
  570             }
  571             else {
  572                 $output_file_names .= "\n" . ( q{ } x 20 ) . $output_file_name;
  573             }
  574         }
  575     }
  576     return $output_file_names;
  577 }
  578 
  579 # [[[ UNCOMPILER ]]]
  580 # [[[ UNCOMPILER ]]]
  581 # [[[ UNCOMPILER ]]]
  582 
  583 sub depends_delete {
  584     (   my string_arrayref $input_file_names,
  585         my hashref_arrayref $output_file_name_groups,
  586         my string_arrayref $output_file_name_prefixes,
  587         my integer $input_files_count,
  588         my hashref_hashref $filename_suffixes_supported,
  589         my string_hashref $modes
  590     ) = @_;
  591 
  592     # [[[ OUTER UNCOMPILE LOOP, USER-SPECIFIED INPUT FILES ]]]
  593     # NEED FIX: Perl::Critic BUG!  'integer' triggers false positive RequireFinalReturn
  594     #    for my integer $i ( 0 .. ( $input_files_count - 1 ) ) {
  595     for my $i ( 0 .. ( $input_files_count - 1 ) ) {
  596         my string $input_file_name                = $input_file_names->[$i];
  597         my string_hashref $output_file_name_group = $output_file_name_groups->[$i];
  598 
  599         if ( $input_files_count > 1 ) {
  600             RPerl::verbose_clear_screen();
  601             RPerl::verbose( 'Input File Number:  ' . ( $i + 1 ) . ' of ' . $input_files_count . "\n" );
  602         }
  603 
  604         RPerl::verbose( 'Input File:         ' . $input_file_name . "\n" );
  605         RPerl::verbose( 'Output File(s):     ' . stringify_output_file_name_group($output_file_name_group, $filename_suffixes_supported) . "\n" );
  606         RPerl::verbose( 'Modes:              magic => '
  607                 . $modes->{magic}
  608                 . ', code => '
  609                 . $modes->{code}
  610                 . ', ops => '
  611                 . $modes->{ops}
  612                 . ', check => '
  613                 . $modes->{types}
  614                 . ', check => '
  615                 . $modes->{check}
  616                 . ', uncompile => '
  617                 . $modes->{uncompile}
  618                 . ', compile => '
  619                 . $modes->{compile}
  620                 . ', subcompile => '
  621                 . $modes->{subcompile}
  622                 . ', parallel => '
  623                 . $modes->{parallel}
  624                 . ', execute => '
  625                 . $modes->{execute}
  626                 . ', label => '
  627                 . $modes->{label}
  628                 . "\n\n" );
  629 
  630         my string_arrayref $input_file_name_deps = [$input_file_name];
  631         my integer $input_file_and_deps_count;
  632         my integer $input_file_deps_count                = 0;
  633         my hashref_arrayref $output_file_name_dep_groups = [$output_file_name_group];
  634 
  635         if ( $modes->{dependencies} eq 'ON' ) {
  636             $input_file_name_deps = RPerl::Compiler::find_dependencies( $input_file_name, 1, $modes );  # second argument set to 1 for true value of $find_subdependencies_recurse
  637             RPerl::verbose('DEPENDENCIES:       Follow & find all deps... ');
  638             if ( exists $input_file_name_deps->[0] ) {
  639                 $input_file_name_deps = accept_and_verify_input_files( $input_file_name_deps, [], $modes );    # verify deps input files
  640 #                if ( ( scalar @{$input_file_name_deps} ) == 0 ) { return; }  # allow require of this file
  641             }
  642             $input_file_name_deps      = [ @{$input_file_name_deps}, $input_file_name ];                       # append input file to deps list
  643             $input_file_and_deps_count = scalar @{$input_file_name_deps};
  644             $input_file_deps_count     = $input_file_and_deps_count - 1;
  645             $output_file_name_dep_groups
  646                 = RPerl::Compiler::generate_output_file_names( $input_file_name_deps, $output_file_name_prefixes, $input_file_and_deps_count, $modes ); # generate deps output file names
  647             RPerl::verbose( sprintf( "%4d", $input_file_deps_count ) . ' found.' . "\n" );
  648             diag_multi_file_settings( $input_file_name_deps, $output_file_name_dep_groups, $input_file_and_deps_count, $filename_suffixes_supported, $modes );
  649         }
  650 
  651         # potentially delete OUTPUT_SOURCE and OUTPUT_BINARY files (not _Inline/);
  652         # skip if INLINE only mode; or *.pm Perl Module input file and DYNAMIC subcompile mode (generates _Inline/ only) and not any SOURCE uncompile modes
  653         if (not (($modes->{uncompile} eq 'INLINE') or (($input_file_name =~ /[.]pm$/xms) and ($modes->{subcompile} eq 'DYNAMIC') and ($modes->{uncompile} !~ m/SOURCE/gxms)) )) {
  654             # [[[ INNER UNCOMPILE LOOP, 1 INPUT FILE & ITS DEPENDENCIES ]]]
  655             for my $j ( 0 .. $input_file_deps_count ) {
  656                 my string $input_file_name_dep                = $input_file_name_deps->[$j];
  657                 my string_hashref $output_file_name_dep_group = $output_file_name_dep_groups->[$j];
  658     
  659                 if ( $j < $input_file_deps_count ) {
  660                     RPerl::verbose( "\n" . 'Dep Output File(s): ' . stringify_output_file_name_group($output_file_name_dep_group, $filename_suffixes_supported) . "\n" );
  661                 }
  662                 elsif ($input_file_deps_count > 1) { 
  663                     RPerl::verbose( "\n" . 'Output File(s):     ' . stringify_output_file_name_group($output_file_name_dep_group, $filename_suffixes_supported) . "\n" );
  664                 }
  665                 RPerl::verbose('UNLINK PHASE 0:     Delete files from disk...');
  666 #                RPerl::diag( 'in depends_delete(), have ( keys %{$output_file_name_dep_group} ) = ' . "\n" . Dumper(keys %{$output_file_name_dep_group}) . "\n" );
  667                 foreach my string $output_file_name_key ( keys %{$output_file_name_dep_group} ) {
  668                     if ((substr $output_file_name_key, 0, 1) eq '_') { next; }
  669                     if  (($modes->{uncompile} eq 'SOURCE_BINARY_INLINE') or 
  670                          ($modes->{uncompile} eq 'SOURCE_BINARY') or 
  671                         (($modes->{uncompile} eq 'SOURCE') and (exists $filename_suffixes_supported->{OUTPUT_SOURCE}->{$output_file_name_key})) or
  672                         (($modes->{uncompile} eq 'BINARY') and (exists $filename_suffixes_supported->{OUTPUT_BINARY}->{$output_file_name_key}))) {
  673                         my string $output_file_name = $output_file_name_dep_group->{$output_file_name_key};
  674                         if ( -f $output_file_name ) {
  675                             unlink $output_file_name
  676                                 or die "\nERROR EUNFI00, UNCOMPILER, FILE SYSTEM: Cannot delete existing file '$output_file_name',\ndying: $OS_ERROR";
  677                         }
  678                     }
  679                 }
  680                 RPerl::verbose( '    done.' . "\n" );
  681             }
  682         }
  683 
  684         # delete _Inline/ if (any INLINE mode or (*.pm Perl module input file and DYNAMIC subcompile mode and any BINARY uncompile mode)) and _Inline/ exists
  685         if (    (    ($modes->{uncompile} =~ m/INLINE/gxms) or 
  686                      (($input_file_name =~ /[.]pm$/xms) and ($modes->{subcompile} eq 'DYNAMIC') and ($modes->{uncompile} =~ m/BINARY/gxms))
  687                 ) and 
  688                 ( -d '_Inline' )) {
  689             RPerl::verbose( ( "\n" x ( $input_files_count - 1 ) ) . 'UNLINK PHASE 1:     Delete _Inline/ from disk...' );
  690             remove_tree( '_Inline', { error => \my $error_hashes } );
  691             if ( @{$error_hashes} ) {
  692                 foreach my string_hashref $error_hash ( @{$error_hashes} ) {
  693                     my ( $file_name, $error_message ) = %{$error_hash};
  694                     if ( $file_name eq '' ) {
  695                         die "\nERROR EUNFI01, UNCOMPILER, FILE SYSTEM: Cannot delete folder '_Inline', general error, \ndying: $error_message";
  696                     }
  697                     else {
  698                         die "\nERROR EUNFI01, UNCOMPILER, FILE SYSTEM: Cannot delete folder '_Inline', error deleting file '$file_name', \ndying: $error_message";
  699                     }
  700                 }
  701             }
  702             RPerl::verbose( ' done.' . "\n" );
  703         }
  704 
  705         if ( ( $input_files_count > 1 ) and ( $i < ( $input_files_count - 1 ) ) ) {
  706             RPerl::verbose_pause("\nPRESS <ENTER> TO CONTINUE\n");
  707         }
  708     }
  709 
  710     return;
  711 }
  712 
  713 # [[[ CALL COMPILER ]]]
  714 # [[[ CALL COMPILER ]]]
  715 # [[[ CALL COMPILER ]]]
  716 
  717 sub depends_parse_generate_save_subcompile_execute {
  718     (   my string_arrayref $input_file_names,
  719         my hashref_arrayref $output_file_name_groups,
  720         my string_arrayref $output_file_name_prefixes,
  721         my integer $input_files_count,
  722         my hashref_hashref $filename_suffixes_supported,
  723         my string_hashref $modes
  724     ) = @_;
  725 
  726 #    RPerl::diag('in depends_parse_generate_save_subcompile_execute(), received $output_file_name_groups = ' . "\n" . Dumper($output_file_name_groups) . "\n");
  727 #    RPerl::diag('in depends_parse_generate_save_subcompile_execute(), received $output_file_name_prefixes = ' . "\n" . Dumper($output_file_name_prefixes) . "\n");
  728 
  729     if ( $modes->{ops} eq 'PERL' ) {
  730 
  731         # PERL ops does not actually SUBCOMPILE, set compile mode to SAVE instead
  732         if ( $modes->{compile} eq 'SUBCOMPILE' ) {
  733             $modes->{compile} = 'SAVE';
  734         }
  735 
  736         # PERL ops does not have CPP types, set types mode to PERL instead
  737         if ( $modes->{types} eq 'CPP' ) { $modes->{types} = 'PERL'; }
  738     }
  739 
  740     # only execute single *.pl program files, executing multiple files may cause unexpected behavior
  741     if ( $input_files_count > 1 ) {
  742         $modes->{execute} = 'OFF';
  743     }
  744 
  745     # [[[ OUTER COMPILE LOOP, USER-SPECIFIED INPUT FILES ]]]
  746     # NEED FIX: Perl::Critic BUG!  'integer' triggers false positive RequireFinalReturn
  747     #    for my integer $i ( 0 .. ( $input_files_count - 1 ) ) {
  748     for my $i ( 0 .. ( $input_files_count - 1 ) ) {
  749         my string $input_file_name                = $input_file_names->[$i];
  750         my string_hashref $output_file_name_group = $output_file_name_groups->[$i];
  751 
  752         # program files (*.pl) need to know their own input file name to create the proper C++ #ifdef version preprocessor directives;
  753         # RPerl::Compiler needs to know if it should perform program or module post-processing
  754         $modes->{_input_file_name} = $input_file_name;
  755         # DEV NOTE, CORRELATION #rp042: do not recursively load the same .cpp/.h file from within itself
  756         $modes->{_input_file_name_current} = $input_file_name;
  757 
  758         # clear symtab before each input file, use automatic dependencies mode (enabled by default) to compile multiple files within a single symtab
  759 #        $modes->{_symbol_table} = {};  # NEED REMOVE, DEPRECATED
  760         $modes->{_symbol_table} = { _namespace => q{}, _subroutine => q{} };
  761 
  762         # only execute *.pl program files, executing *.pm module files causes useless additional subcompile to occur
  763         if ( ( $modes->{execute} eq 'ON' ) and ( $input_file_name !~ /[.]pl$/xms ) ) {
  764             $modes->{execute} = 'OFF';
  765         }
  766 
  767         if ( $input_files_count > 1 ) {
  768             RPerl::verbose_clear_screen();
  769             RPerl::verbose( 'Input File Number:  ' . ( $i + 1 ) . ' of ' . $input_files_count . "\n" );
  770         }
  771 
  772         RPerl::verbose( 'Input File:         ' . $input_file_name . "\n" );
  773         RPerl::verbose( 'Output File(s):     ' . stringify_output_file_name_group($output_file_name_group, $filename_suffixes_supported) . "\n" );
  774         RPerl::verbose( 'Modes:              magic => '
  775                 . $modes->{magic}
  776                 . ', code => '
  777                 . $modes->{code}
  778                 . ', ops => '
  779                 . $modes->{ops}
  780                 . ', types => '
  781                 . $modes->{types}
  782                 . ', check => '
  783                 . $modes->{check}
  784                 . ', uncompile => '
  785                 . $modes->{uncompile}
  786                 . ', compile => '
  787                 . $modes->{compile}
  788                 . ', subcompile => '
  789                 . $modes->{subcompile}
  790                 . ', parallel => '
  791                 . $modes->{parallel}
  792                 . ', execute => '
  793                 . $modes->{execute}
  794                 . ', label => '
  795                 . $modes->{label}
  796                 . "\n\n" );
  797 
  798         my string_arrayref $input_file_name_deps = [$input_file_name];
  799         my integer $input_file_and_deps_count;
  800         my integer $input_file_deps_count                = 0;
  801         my hashref_arrayref $output_file_name_dep_groups = [$output_file_name_group];
  802         my hashref_arrayref $source_dep_groups           = [];
  803 
  804         if ( $modes->{dependencies} eq 'ON' ) {
  805             $input_file_name_deps = RPerl::Compiler::find_dependencies( $input_file_name, 1, $modes );  # second argument set to 1 for true value of $find_subdependencies_recurse
  806             RPerl::verbose('DEPENDENCIES:       Follow & find all deps... ');
  807             if ( exists $input_file_name_deps->[0] ) {
  808                 $input_file_name_deps = accept_and_verify_input_files( $input_file_name_deps, [], $modes );    # verify deps input files
  809 #                if ( ( scalar @{$input_file_name_deps} ) == 0 ) { return; }  # allow require of this file
  810             }
  811             $input_file_name_deps      = [ @{$input_file_name_deps}, $input_file_name ];                       # append input file to deps list
  812             $input_file_and_deps_count = scalar @{$input_file_name_deps};
  813             $input_file_deps_count     = $input_file_and_deps_count - 1;
  814             $output_file_name_dep_groups
  815                 = RPerl::Compiler::generate_output_file_names( $input_file_name_deps, $output_file_name_prefixes, $input_file_and_deps_count, $modes ); # generate deps output file names
  816             RPerl::verbose( sprintf( "%4d", $input_file_deps_count ) . ' found.' . "\n" );
  817             diag_multi_file_settings( $input_file_name_deps, $output_file_name_dep_groups, $input_file_and_deps_count, $filename_suffixes_supported, $modes );
  818         }
  819 
  820         if ( ( $input_file_deps_count > 0 ) and ( $modes->{compile} ne 'PARSE' ) ) {
  821             $modes->{_compile_saved} = $modes->{compile};
  822             $modes->{compile}        = 'GENERATE';
  823         }
  824 
  825         # [[[ FIRST INNER COMPILE LOOP, 1 INPUT FILE & ITS DEPENDENCIES, DEFER SAVE & SUBCOMPILE IF DEPENDENCIES EXIST ]]]
  826         for my $j ( 0 .. $input_file_deps_count ) {
  827             my string $input_file_name_dep                = $input_file_name_deps->[$j];
  828             my string_hashref $output_file_name_dep_group = $output_file_name_dep_groups->[$j];
  829 
  830             # DEV NOTE, CORRELATION #rp042: do not recursively load the same .cpp/.h file from within itself
  831             $modes->{_input_file_name_current} = $input_file_name_dep;
  832 
  833             if ( $input_file_deps_count > 0 ) {
  834                 if ( $j < $input_file_deps_count ) {
  835                     RPerl::verbose( "\n" . 'Dep Input File:     ' . $input_file_name_dep . "\n" );
  836 
  837                 }
  838                 else {
  839                     RPerl::verbose( "\n" . 'Input File:         ' . $input_file_name_dep . "\n" );
  840                 }
  841             }
  842 
  843             if ( $modes->{ops} eq 'PERL' ) {
  844                 $source_dep_groups->[$j] = RPerl::Compiler::rperl_to_rperl__parse_generate( $input_file_name_dep, $output_file_name_dep_group, {}, $modes );
  845             }
  846             elsif ( $modes->{ops} eq 'CPP' ) {
  847 
  848                 # use eval to trap C++ compiler errors
  849                 my integer $eval_retval = eval {
  850                     $source_dep_groups->[$j]
  851                         = RPerl::Compiler::rperl_to_xsbinary__parse_generate_compile( $input_file_name_dep, $output_file_name_dep_group, {}, $modes ); # returns void
  852                     1;    # return true
  853                 };
  854                 if ( not defined $eval_retval ) {
  855                     print $EVAL_ERROR;
  856 #                    die 'Encountered eval-trapped dependency error, dying' . "\n";
  857 
  858                     # force-disable everything except code generation if an error is trapped in eval() above,
  859                     # that we we continue seeing errors but we never save any files to disk
  860                     $modes->{compile} = 'GENERATE';
  861                     $modes->{_compile_saved} = 'GENERATE';
  862                     $modes->{subcompile} = 'OFF';
  863                     $modes->{execute} = 'OFF';
  864                     $modes->{_bailout_message} = "\n" . 'BAILING OUT:        One or more problems encountered, see error messages above for details, dying' . "\n";
  865                 }
  866             }
  867         }
  868 
  869         if (    ( $input_file_deps_count > 0 )
  870             and ( $modes->{compile} ne 'PARSE' )
  871             and ( ( $modes->{_compile_saved} eq 'SAVE' ) or ( $modes->{_compile_saved} eq 'SUBCOMPILE' ) ) )
  872         {
  873             RPerl::verbose( "\n" . 'DEPENDENCIES:       Complete deferred actions...' . "\n" );
  874 #            RPerl::diag( "\n" . 'have $modes = ' . Dumper($modes) . "\n" );
  875 
  876             # [[[ SECOND INNER COMPILE LOOP, 1 INPUT FILE & ITS DEPENDENCIES, DEFERRED SAVE & SUBCOMPILE ]]]
  877             for my $j ( 0 .. $input_file_deps_count ) {
  878                 $modes->{compile} = $modes->{_compile_saved} . '_DEFERRED';
  879                 my string $input_file_name_dep                = $input_file_name_deps->[$j];
  880                 my string_hashref $output_file_name_dep_group = $output_file_name_dep_groups->[$j];
  881                 my string_hashref $source_dep_group           = $source_dep_groups->[$j];
  882 
  883                 if ( $j < $input_file_deps_count ) {
  884                     RPerl::verbose( "\n" . 'Dep Output File(s): ' . stringify_output_file_name_group($output_file_name_dep_group, $filename_suffixes_supported) . "\n" );
  885                 }
  886                 else {
  887                     RPerl::verbose( "\n" . 'Output File(s):     ' . stringify_output_file_name_group($output_file_name_dep_group, $filename_suffixes_supported) . "\n" );
  888                 }
  889 
  890                 if ( $modes->{ops} eq 'PERL' ) {
  891                     RPerl::Compiler::rperl_to_rperl__parse_generate( $input_file_name_dep, $output_file_name_dep_group, $source_dep_group, $modes );
  892                 }
  893                 elsif ( $modes->{ops} eq 'CPP' ) {
  894 
  895 #                RPerl::diag( 'in depends_parse_generate_save_subcompile_execute(), have $modes->{_symbol_table} = ' . "\n" . Dumper($modes->{_symbol_table}) . "\n" );
  896 
  897                     # do not subcompile deps
  898                     if ( ( $j < $input_file_deps_count ) and ( $modes->{compile} eq 'SUBCOMPILE_DEFERRED' ) ) {
  899                         $modes->{compile} = 'SAVE_DEFERRED';
  900                     }
  901 
  902                     # use eval to trap C++ compiler errors
  903                     my integer $eval_retval = eval {
  904                         RPerl::Compiler::rperl_to_xsbinary__parse_generate_compile( $input_file_name_dep, $output_file_name_dep_group, $source_dep_group,
  905                             $modes );    # returns void
  906                         1;               # return true
  907                     };
  908                     if ( not defined $eval_retval ) {
  909                         print $EVAL_ERROR;
  910 
  911                         # force-disable execution if an error is trapped in eval() above
  912                         $modes->{execute} = 'OFF';
  913                     }
  914                 }
  915             }
  916         }
  917 
  918         if ( $modes->{execute} eq 'ON' ) {
  919             RPerl::verbose( 'EXECUTE:            Run code...' . "\n" );
  920             RPerl::verbose("\n");
  921 #            RPerl::diag('in rperl depends_parse_generate_save_subcompile_execute(), have \$modes = ' . Dumper($modes) . "'\n");
  922 
  923             # if subcompiled C++, then run binary executable instead of original interpreted source code
  924             if (($modes->{ops} eq 'CPP') and ($modes->{compile} eq 'SUBCOMPILE')) {
  925                 my $execute_file_name = $output_file_name_group->{EXE};
  926 #                RPerl::diag('in rperl depends_parse_generate_save_subcompile_execute(), have $execute_file_name = ' . $execute_file_name . "\n");
  927                 if ( defined $modes->{arguments} ) {
  928                     my integer $execute_retval = system( $execute_file_name, @{ $modes->{arguments} } );
  929                 }
  930                 else {
  931                     my integer $execute_retval = system( $execute_file_name );
  932                 }
  933             }
  934             else {
  935                 if ( defined $modes->{arguments} ) {
  936                     my integer $execute_retval = system( $EXECUTABLE_NAME, $input_file_name, @{ $modes->{arguments} } );
  937                 }
  938                 else {
  939                     my integer $execute_retval = system( $EXECUTABLE_NAME, $input_file_name );
  940                 }
  941             }
  942 
  943         }
  944 
  945  #        RPerl::diag( 'in depends_parse_generate_save_subcompile_execute(), have $modes->{_symbol_table} = ' . "\n" . Dumper($modes->{_symbol_table}) . "\n" );
  946 
  947         if (    ( $input_files_count > 1 )
  948             and ( $i < ( $input_files_count - 1 ) ) )
  949         {
  950             RPerl::verbose_pause("\nPRESS <ENTER> TO CONTINUE\n");
  951         }
  952     }
  953 
  954     if ((exists $modes->{_bailout_message}) and (defined $modes->{_bailout_message}) and ($modes->{_bailout_message} ne q{})) {
  955         die $modes->{_bailout_message};
  956     }
  957 
  958     return;
  959 }
  960 
  961 # [[[ OPERATIONS ]]]
  962 
  963 # [[[ ACTUALLY RUN CODE ]]]
  964 # [[[ ACTUALLY RUN CODE ]]]
  965 # [[[ ACTUALLY RUN CODE ]]]
  966 
  967 my hashref_hashref $filename_suffixes_supported = $RPerl::Compiler::filename_suffixes_supported;
  968 my integer $input_files_count = 0;
  969 
  970 GetOptions(%{$::rperl_options}) or die "ERROR EAR00: Failure processing command-line arguments, dying\n";
  971 
  972 if ($::help_flag) { pod2usage( -verbose => 1, -width => 80, -exitval => 0 ); exit; }
  973 if ($::vversions_flag) { $RPerl::VERBOSE = 1; verbose_versions(); exit; }
  974 if ($::version_flag) {
  975 
  976     # NEED UPDATE: automatically generate version info
  977 
  978     # DEV NOTE, CORRELATION #rp016: numbering schemes mentioned below
  979     my $version_message = <<EOL;
  980 This is RPerl version 5.002_000, Long Date 20191128, Star Date 2019.332, Codename Skylab 2
  981 v5.002_000 using RPerl's underscore-is-comma numbering scheme
  982 v5.002000  using  CPAN's underscore-is-beta  numbering scheme
  983 
  984 Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, William N. Braswell, Jr..  All Rights Reserved.
  985 RPerl is part of the RPerl Family of software and documentation.
  986 This work is Free & Open Source; you can redistribute it and/or modify it 
  987 under the same terms as Perl 5.30.0.
  988 
  989 Perl may be copied only under the terms of either the Artistic License or the
  990 GNU General Public License, which may be found in the Perl 5 source kit.
  991 For licensing details, please see http://dev.perl.org/licenses/
  992 
  993 Complete documentation for RPerl, including FAQ lists, should be found on 
  994 this system using `man rperl` or `perldoc rperl` or `perldoc RPerl::Learning`.  
  995 If you have access to the Internet, point your browser at the RPerl Home Page.
  996 http://www.rperl.org/
  997 
  998 EOL
  999     print $version_message;
 1000     exit;
 1001 }
 1002 
 1003 # pre-aggregate values of uncompile mode flags
 1004 if (defined $::uncompile_source_flag) { if ($::uncompile_source_flag) { $::uncompile_flag = 1; } else { $::uncompile_flag = 0; } }
 1005 if (defined $::uncompile_source_binary_flag) { if ($::uncompile_source_binary_flag) { $::uncompile_flag = 2; } else { $::uncompile_flag = 0; } }
 1006 if (defined $::uncompile_source_binary_inline_flag) { if ($::uncompile_source_binary_inline_flag) { $::uncompile_flag = 3; } else { $::uncompile_flag = 0; } }
 1007 
 1008 verbose_flags(
 1009     $::magic_low_flag, $::magic_medium_flag, $::magic_high_flag, $::dependencies_flag, $::uncompile_flag, $::compile_flag, $::subcompile_assemble_flag,
 1010     $::subcompile_archive_flag,      $::subcompile_shared_flag,           $::subcompile_static_flag, $::parallel_flag,        $::execute_flag, $::test_flag
 1011 );
 1012 
 1013 use rperloptions;
 1014 $::input_file_names  = accept_and_verify_input_files( $::input_file_names, $::input_file_names_unlabeled, $::modes );
 1015 
 1016 #if ( ( scalar @{$::input_file_names} ) == 0 ) { return 1; }  # allow require of this file
 1017 $input_files_count = scalar @{$::input_file_names};
 1018 $::modes             = verify_and_default_modes(
 1019     $::modes,              $::modes_default, $::modes_supported, 
 1020     $::magic_low_flag, $::magic_medium_flag, $::magic_high_flag, 
 1021     $::dependencies_flag, $::uncompile_flag, $::compile_flag,  
 1022     $::subcompile_assemble_flag,   $::subcompile_archive_flag,      $::subcompile_shared_flag,
 1023     $::subcompile_static_flag, $::subcompile_CXX, $::parallel_flag, $::num_cores, $::execute_flag,  $::test_flag, $::input_file_names
 1024 );
 1025 $::output_file_name_groups = RPerl::Compiler::generate_output_file_names( $::input_file_names, $::output_file_name_prefixes, $input_files_count, $::modes );
 1026 verbose_multi_file_settings( $::input_file_names, $::output_file_name_groups, $input_files_count, $filename_suffixes_supported, $::modes );
 1027 if ( $::modes->{uncompile} ne 'OFF' ) { depends_delete( $::input_file_names, $::output_file_name_groups, $::output_file_name_prefixes, $input_files_count, $filename_suffixes_supported, $::modes ); }
 1028 else { depends_parse_generate_save_subcompile_execute( $::input_file_names, $::output_file_name_groups, $::output_file_name_prefixes, $input_files_count, $filename_suffixes_supported, $::modes ); }
 1029 
 1030 #1;  # allow require of this file
 1031 
 1032 __END__
 1033 =head1 NAME
 1034 
 1035 rperl Front-End Program
 1036 
 1037 Restricted Perl, The Optimizing Perl 5 Compiler
 1038 
 1039 =head1 SYNOPSIS
 1040 
 1041         rperl [ARGUMENTS] input_program_0.pl [input_program_1.pl input_program_2.pl ...]
 1042         rperl [ARGUMENTS] MyClassFoo.pm [MyClassBar.pm MyClassBat.pm ...]
 1043         rperl [ARGUMENTS] input_program_0.pl MyClassFoo.pm [input_program_1.pl ... MyClassBar.pm ...]
 1044 
 1045 =for DEV NOTE, CORRELATION #rp029: all updates to `rperl` command-line arguments must be documented in script/rperl and 2 places in lib/RPerl/Learning.pm
 1046 
 1047 =head1 ARGUMENTS
 1048 
 1049 =for comment head2 B.1: Help
 1050 
 1051 =over
 1052 
 1053 =item B<--help ...OR... -h ...OR... -?>
 1054 
 1055 =for rperl X<noncode>
 1056 
 1057     Print this (relatively) brief help message for command-line usage.
 1058     For additional explanations, run the command `perldoc RPerl::Learning` and see Appendix B.
 1059 
 1060 =for rperl X</noncode>
 1061 
 1062 =back
 1063 
 1064 =for comment head2 B.2: Version
 1065 
 1066 =over
 1067 
 1068 =item B<--version ...OR... -v>
 1069 
 1070 =item B<--vversion ...OR... -vv>
 1071 
 1072 =for rperl X<noncode>
 1073 
 1074     Print version number and copyright information.
 1075     Repeat as 'vv' for more technical information, similar to `perl -V` configuration summary argument.
 1076     Lowercase 'v' not to be confused with uppercase 'V' in 'Verbose' argument.
 1077 
 1078 =for rperl X</noncode>
 1079 
 1080 =back
 1081 
 1082 =for comment head2 B.3: Input Files
 1083 
 1084 =over
 1085 
 1086 =item B<--infile=MyFile.pm ...OR... -i=MyFile.pm>
 1087 
 1088 =for rperl X<noncode>
 1089 
 1090     Specify input file, may be repeated for multiple input files.
 1091     Argument prefix '--infile' may be entirely omitted.
 1092     Argument prefix MUST be omitted to specify wildcard for multiple input files.
 1093 
 1094 =for rperl X</noncode>
 1095 
 1096 =back
 1097 
 1098 =for comment head2 B.4: Output Files
 1099 
 1100 =over
 1101 
 1102 =item B<--outfile=MyCompiledModule ...OR... -o=MyCompiledModule>
 1103 
 1104 =item B<--outfile=my_compiled_program ...OR... -o=my_compiled_program>
 1105 
 1106 =for rperl X<noncode>
 1107 
 1108     Specify output file prefix, may be repeated for multiple output files.
 1109     RPerl *.pm input file with PERL ops will create MyCompiledModule.pmc output file.
 1110     RPerl *.pl input file with PERL ops will create my_compiled_program (or my_compiled_program.exe on Windows) output file.
 1111     RPerl *.pm input file with CPP  ops will create MyCompiledModule.pmc, MyCompiledModule.cpp, & MyCompiledModule.h output files.
 1112     RPerl *.pl input file with CPP  ops will create my_compiled_program (or my_compiled_program.exe on Windows) & my_compiled_program.cpp output files.
 1113     Argument may be entirely omitted, foo.* input file will default to foo.* output file(s).
 1114 
 1115 =for rperl X</noncode>
 1116 
 1117 =back
 1118 
 1119 =for comment head2 B.5: C++ Compiler
 1120 
 1121 =over
 1122 
 1123 =item B<--CXX=/path/to/compiler>
 1124 
 1125 =for rperl X<noncode>
 1126 
 1127     Specify path to C++ compiler for use in subcompile modes, equivalent to '--mode CXX=/path/to/compiler' or 'CXX' manual Makefile argument, 'g++' by default.
 1128 
 1129 =for rperl X</noncode>
 1130 
 1131 =back
 1132 
 1133 =for comment head2 B.6: Modes, Magic
 1134 
 1135 =over
 1136 
 1137 =item B<--mode magic=LOW ...OR... -m magic=LOW>
 1138 
 1139 =item B<--mode magic=MEDIUM ...OR... -m magic=MEDIUM>
 1140 
 1141 =item B<--mode magic=HIGH ...OR... -m magic=HIGH>
 1142 
 1143 =for rperl X<noncode>
 1144 
 1145     Specify magic mode, LOW by default.
 1146     If set to LOW, accept low-magic (static) Perl source code in the source code input file(s).
 1147     If set to MEDIUM, accept medium-magic (mostly static) Perl source code in the source code input file(s).
 1148     If set to HIGH, accept high-magic (dynamic) Perl source code in the source code input file(s).
 1149     Because only low-magic mode is supported at this time, this option does not currently have any effect.
 1150 
 1151 =for rperl X</noncode>
 1152 
 1153 =back
 1154 
 1155 =for comment head2 B.7: Modes, Code
 1156 
 1157 =over
 1158 
 1159 =item B<--mode code=PERL ...OR... -m code=PERL>
 1160 
 1161 =item B<--mode code=CPP ...OR... -m code=CPP>
 1162 
 1163 =for rperl X<noncode>
 1164 
 1165     Specify source code mode, CPP by default.
 1166     If set to PERL, generate Perl source code in the source code output file(s).
 1167     If set to CPP, generate C++ source code in the source code output file(s).
 1168     PERL operations mode forces PERL code mode; CPP operations mode forces CPP code mode.
 1169     Because code mode is dependent upon operations mode, this option does not currently have any effect.
 1170 
 1171 =for rperl X</noncode>
 1172 
 1173 =back
 1174 
 1175 =for comment head2 B.8: Modes, Operations
 1176 
 1177 =over
 1178 
 1179 =item B<--mode ops=PERL ...OR... -m ops=PERL>
 1180 
 1181 =item B<--mode ops=CPP ...OR... -m ops=CPP>
 1182 
 1183 =for rperl X<noncode>
 1184 
 1185     Specify operations mode, CPP by default.
 1186     If set to PERL, generate Perl operations in the source code output file(s).
 1187     If set to CPP, generate C++ operations in the source code output file(s).
 1188     PERL ops mode forces PERL types mode & PARSE or GENERATE compile mode; PERLOPS_PERLTYPES is test mode, does not actually compile.
 1189 
 1190 =for rperl X</noncode>
 1191 
 1192 =back
 1193 
 1194 =for comment head2 B.9: Modes, Types
 1195 
 1196 =over
 1197 
 1198 =item B<--mode types=PERL ...OR... -m types=PERL>
 1199 
 1200 =item B<--mode types=CPP ...OR... -m types=CPP>
 1201 
 1202 =item B<--mode types=DUAL ...OR... -m types=DUAL>
 1203 
 1204 =for rperl X<noncode>
 1205 
 1206     Specify data types mode, CPP by default.
 1207     If set to PERL, generate Perl data types in the source code output file(s).
 1208     If set to CPP, generate C++ data types in the source code output file(s).
 1209     If set to DUAL, generate both Perl and C++ data types in the source code output file(s).
 1210     DUAL mode allows generate-once-compile-many types, selected by '#define __FOO__TYPES' in lib/rperltypes_mode.h or `gcc -D__FOO__TYPES` manual subcompile argument.
 1211 
 1212 =for rperl X</noncode>
 1213 
 1214 =back
 1215 
 1216 =for comment head2 B.10: Modes, Integer Type
 1217 
 1218 =over
 1219 
 1220 =item B<--mode type_integer=LONG ...OR... -m type_integer=LONG>
 1221 
 1222 =item B<--mode type_integer=LONG__LONG ...OR... -m type_integer=LONG__LONG>
 1223 
 1224 =for rperl X<noncode>
 1225 
 1226     Specify native C++ integer data type, same as internal Perl type by default.
 1227     If set to LONG, utilize 'long' as native type for 'integer', at least 32 bits;
 1228     If set to LONG__LONG, utilize 'long long' as native type for 'integer', at least 64 bits.
 1229 
 1230 =for rperl X</noncode>
 1231 
 1232 =back
 1233 
 1234 =for comment head2 B.11: Modes, Number Type
 1235 
 1236 =over
 1237 
 1238 =item B<--mode type_number=DOUBLE ...OR... -m type_number=DOUBLE>
 1239 
 1240 =item B<--mode type_number=LONG__DOUBLE ...OR... -m type_number=LONG__DOUBLE>
 1241 
 1242 =for rperl X<noncode>
 1243 
 1244     Specify native C++ number data type, same as internal Perl type by default.
 1245     If set to DOUBLE, utilize 'double' as native type for 'number', usually at least 32 bits, but not guaranteed;
 1246     If set to LONG__DOUBLE, utilize 'long double' as native type for 'number', usually at least 64 bits, but not guaranteed.
 1247 
 1248 =for rperl X</noncode>
 1249 
 1250 =back
 1251 
 1252 =for comment head2 B.12: Modes, Type Checking
 1253 
 1254 =over
 1255 
 1256 =item B<--mode check=OFF ...OR... -m check=OFF>
 1257 
 1258 =item B<--mode check=ON ...OR... -m check=ON>
 1259 
 1260 =item B<--mode check=TRACE ...OR... -m check=TRACE>
 1261 
 1262 =for rperl X<noncode>
 1263 
 1264     Specify data type checking mode, TRACE by default.
 1265     If set to OFF, do not perform dynamic type checking, only built-in C++ static type checking.
 1266     If set to ON, perform dynamic type checking in addition to built-in C++ static type checking.
 1267     If set to TRACE, perform dynamic type checking in addition to built-in C++ static type checking, with subroutine-and-variable trace information.
 1268 
 1269 =for rperl X</noncode>
 1270 
 1271 =back
 1272 
 1273 =for comment head2 B.13: Modes, Dependencies
 1274 
 1275 =over
 1276 
 1277 =item B<--mode dependencies=OFF ...OR... -m dependencies=OFF>
 1278 
 1279 =item B<--mode dependencies=ON ...OR... -m dependencies=ON>
 1280 
 1281 =for rperl X<noncode>
 1282 
 1283     Specify dependencies mode, ON by default.
 1284     If set to OFF, do not search for or compile dependencies.
 1285     If set to ON, recursively search for dependencies and subdependencies, include as additional input file(s).
 1286     WARNING: Disabling dependencies will likely cause errors or undefined behavior.
 1287 
 1288 =for rperl X</noncode>
 1289 
 1290 =back
 1291 
 1292 =for comment head2 B.14: Modes, Uncompile
 1293 
 1294 =over
 1295 
 1296 =item B<--mode uncompile=OFF ...OR... -m uncompile=OFF>
 1297 
 1298 =item B<--mode uncompile=SOURCE ...OR... -m uncompile=SOURCE>
 1299 
 1300 =item B<--mode uncompile=BINARY ...OR... -m uncompile=BINARY>
 1301 
 1302 =item B<--mode uncompile=INLINE ...OR... -m uncompile=INLINE>
 1303 
 1304 =item B<--mode uncompile=SOURCE_BINARY ...OR... -m uncompile=SOURCE_BINARY>
 1305 
 1306 =item B<--mode uncompile=SOURCE_BINARY_INLINE ...OR... -m uncompile=SOURCE_BINARY_INLINE>
 1307 
 1308 =for rperl X<noncode>
 1309 
 1310     Specify uncompile mode, OFF by default.
 1311     If set to SOURCE, delete all generated C++ output source code (not subcompiled) files: *.cpp, *.h, *.pmc
 1312     If set to BINARY, delete all generated C++ output binary (subcompiled) files: *.o, *.a, *.so, *.exe, non-suffixed executables
 1313     If set to INLINE, delete all generated C++ output Inline::CPP files: _Inline/ directory
 1314     If set to SOURCE_BINARY, delete both SOURCE and BINARY files.
 1315     If set to SOURCE_BINARY_INLINE, delete SOURCE, BINARY, and INLINE files.
 1316     For *.pm Perl module input files, BINARY and INLINE are equivalent.
 1317 
 1318 =for rperl X</noncode>
 1319 
 1320 =back
 1321 
 1322 =for comment head2 B.15: Modes, Compile
 1323 
 1324 =over
 1325 
 1326 =item B<--mode compile=OFF ...OR... -m compile=OFF>
 1327 
 1328 =item B<--mode compile=PARSE ...OR... -m compile=PARSE>
 1329 
 1330 =item B<--mode compile=GENERATE ...OR... -m compile=GENERATE>
 1331 
 1332 =item B<--mode compile=SAVE ...OR... -m compile=SAVE>
 1333 
 1334 =item B<--mode compile=SUBCOMPILE ...OR... -m compile=SUBCOMPILE>
 1335 
 1336 =for rperl X<noncode>
 1337 
 1338     Specify compile mode, SUBCOMPILE by default.
 1339     If set to PARSE, begin with RPerl input source code file(s), and end with RPerl abstract syntax tree output data structure.
 1340     If set to GENERATE, begin with RPerl input source code file(s), and end with RPerl and/or C++ output source code in memory.
 1341     If set to SAVE, begin with RPerl input source code file(s), and end with RPerl and/or C++ output source code file(s) saved to disk.
 1342     If set to SUBCOMPILE, begin with RPerl input source code file(s), and end with C++ output binary file(s).
 1343 
 1344 =for rperl X</noncode>
 1345 
 1346 =back
 1347 
 1348 =for comment head2 B.16: Modes, Subcompile
 1349 
 1350 =over
 1351 
 1352 =item B<--mode subcompile=OFF ...OR... -m subcompile=OFF>
 1353 
 1354 =item B<--mode subcompile=ASSEMBLE ...OR... -m subcompile=ASSEMBLE>
 1355 
 1356 =item B<--mode subcompile=ARCHIVE ...OR... -m subcompile=ARCHIVE>
 1357 
 1358 =item B<--mode subcompile=SHARED ...OR... -m subcompile=SHARED>
 1359 
 1360 =item B<--mode subcompile=STATIC ...OR... -m subcompile=STATIC>
 1361 
 1362 =item B<--mode subcompile=DYNAMIC ...OR... -m subcompile=DYNAMIC>
 1363 
 1364 =for rperl X<noncode>
 1365 
 1366     Specify subcompile mode, DYNAMIC by default.
 1367     If set to ASSEMBLE, generate *.o object binary output file(s).
 1368     If set to ARCHIVE, generate *.a object archive binary output file(s).
 1369     If set to SHARED, generate *.so shared object binary output file(s).
 1370     If set to STATIC, generate statically-linked *.exe or non-suffixed executable binary output file(s).
 1371     If set to DYNAMIC, generate dynamically-linked *.exe or non-suffixed executable binary output file(s).
 1372 
 1373 =for rperl X</noncode>
 1374 
 1375 =back
 1376 
 1377 =for comment head2 B.17: Modes, C++ Compiler
 1378 
 1379 =over
 1380 
 1381 =item B<--mode CXX=/path/to/compiler ...OR... -m CXX=/path/to/compiler>
 1382 
 1383 =for rperl X<noncode>
 1384 
 1385     Specify path to C++ compiler for use in subcompile modes, equivalent to '--CXX=/path/to/compiler' or 'CXX' manual Makefile argument, 'g++' by default.
 1386 
 1387 =for rperl X</noncode>
 1388 
 1389 =back
 1390 
 1391 =for comment head2 B.18: Modes, Parallelize
 1392 
 1393 =over
 1394 
 1395 =item B<--mode parallel=OFF ...OR... -m parallel=OFF>
 1396 
 1397 =item B<--mode parallel=OPENMP ...OR... -m parallel=OPENMP>
 1398 
 1399 =item B<--mode parallel=MPI ...OR... -m parallel=MPI>  ((( COMING SOON!!! )))
 1400 
 1401 =item B<--mode parallel=OPENCL ...OR... -m parallel=OPENCL>  ((( COMING SOON!!! )))
 1402 
 1403 =for rperl X<noncode>
 1404 
 1405     Specify automatic parallelization mode, OFF by default.
 1406     If set to OFF, do not automatically parallelize any input files.
 1407     If set to OPENMP, automatically parallelize all eligible input files for use on shared-memory OpenMP systems.
 1408     If set to MPI (COMING SOON), automatically parallelize all eligible input files for use on distributed-memory MPI systems.
 1409     If set to OPENCL (COMING SOON), automatically parallelize all eligible input files for use on heterogeneous or GPU systems.
 1410 
 1411 =for rperl X</noncode>
 1412 
 1413 =back
 1414 
 1415 =for comment head2 B.19: Modes, Parallelize, Number Of Cores
 1416 
 1417 =over
 1418 
 1419 =item B<--mode num_cores=2 ...OR... -m num_cores=2 ...OR... --num_cores=2 ...OR... -num=2>
 1420 
 1421 =item B<--mode num_cores=4 ...OR... -m num_cores=4 ...OR... --num_cores=4 ...OR... -num=4>
 1422 
 1423 =item B<--mode num_cores=8 ...OR... -m num_cores=8 ...OR... --num_cores=8 ...OR... -num=8>
 1424 
 1425 =item B<...ETC...>
 1426 
 1427 =for rperl X<noncode>
 1428 
 1429     Specify number of CPU cores to utilize for OPENMP automatic parallelization mode, 4 by default.
 1430 
 1431 =for rperl X</noncode>
 1432 
 1433 =back
 1434 
 1435 =for comment head2 B.20: Modes, Execute
 1436 
 1437 =over
 1438 
 1439 =item B<--mode execute=OFF ...OR... -m execute=OFF>
 1440 
 1441 =item B<--mode execute=ON ...OR... -m execute=ON>
 1442 
 1443 =for rperl X<noncode>
 1444 
 1445     Specify execute mode, ON by default.
 1446     If set to OFF, do not load or run any user-supplied program(s).
 1447     If set to ON with one *.pl Perl program input file, load and run the program.
 1448     If set to ON with more than one *.pl Perl program input file, do not load or run any programs.
 1449 
 1450 =for rperl X</noncode>
 1451 
 1452 =back
 1453 
 1454 =for comment head2 B.21: Modes, Source Code Labels
 1455 
 1456 =over
 1457 
 1458 =item B<--mode label=OFF ...OR... -m label=OFF>
 1459 
 1460 =item B<--mode label=ON ...OR... -m label=ON>
 1461 
 1462 =for rperl X<noncode>
 1463 
 1464     Specify source section label mode, ON by default.
 1465     If set to OFF, generate minimal output source code, may save disk space.
 1466     If set to ON, generate some informative labels in output source code, may be more human-readable.
 1467 
 1468 =for rperl X</noncode>
 1469 
 1470 =back
 1471 
 1472 =for comment head2 B.22: Flags, Verbose
 1473 
 1474 =over
 1475 
 1476 =item B<--Verbose ...OR... -V>
 1477 
 1478 =item B<--noVerbose ...OR... -noV>
 1479 
 1480 =for rperl X<noncode>
 1481 
 1482     Include additional user information in output, or not.
 1483     If enabled, equivalent to `export RPERL_VERBOSE=1` shell command.
 1484     Disabled by default.
 1485     Uppercase 'V' not to be confused with lowercase 'v' in 'version' argument.
 1486 
 1487 =for rperl X</noncode>
 1488 
 1489 =back
 1490 
 1491 =for comment head2 B.23: Flags, Debug
 1492 
 1493 =over
 1494 
 1495 =item B<--Debug ...OR... -D>
 1496 
 1497 =item B<--noDebug ...OR... -noD>
 1498 
 1499 =for rperl X<noncode>
 1500 
 1501     Include debugging & system diagnostic information in output, or not.
 1502     If enabled, equivalent to `export RPERL_DEBUG=1` shell command.
 1503     Disabled by default.
 1504     Uppercase 'D' not to be confused with lowercase 'd' in 'dependencies' argument.
 1505 
 1506 =for rperl X</noncode>
 1507 
 1508 =back
 1509 
 1510 =for comment head2 B.24: Flags, Warnings
 1511 
 1512 =over
 1513 
 1514 =item B<--Warnings ...OR... -W>
 1515 
 1516 =item B<--noWarnings ...OR... -noW>
 1517 
 1518 =for rperl X<noncode>
 1519 
 1520     Include system warnings in output, or not.
 1521     If disabled, equivalent to `export RPERL_WARNINGS=0` shell command.
 1522     Enabled by default.
 1523 
 1524 =for rperl X</noncode>
 1525 
 1526 =back
 1527 
 1528 =for comment head2 B.25: Flags, Test
 1529 
 1530 =over
 1531 
 1532 =item B<--test ...OR... -t>
 1533 
 1534 =for rperl X<noncode>
 1535 
 1536     Test mode: Perl ops, Perl types, Parse & Generate (no Save or Compile)
 1537     If enabled, equivalent to '--mode ops=PERL --mode types=PERL --mode compile=GENERATE' arguments.
 1538     Disabled by default.
 1539 
 1540 =for rperl X</noncode>
 1541 
 1542 =back
 1543 
 1544 =for comment head2 B.26: Flags, Low Magic
 1545 
 1546 =over
 1547 
 1548 =item B<--low ...OR... -l>
 1549 
 1550 =for rperl X<noncode>
 1551 
 1552     Accept low-magic (static) Perl source code in the source code input file(s).
 1553     Enabled by default, equivalent to '--mode magic=LOW' argument.
 1554     Because only low-magic mode is supported at this time, this option does not currently have any effect.
 1555 
 1556 =for rperl X</noncode>
 1557 
 1558 =back
 1559 
 1560 =for comment head2 B.27: Flags, Medium Magic
 1561 
 1562 =over
 1563 
 1564 =item B<--medium>
 1565 
 1566 =for rperl X<noncode>
 1567 
 1568     Accept medium-magic (mostly static) Perl source code in the source code input file(s).
 1569     Disabled by default, equivalent to '--mode magic=MEDIUM' argument.
 1570     Because only low-magic mode is supported at this time, this option does not currently have any effect.
 1571     Shorthand '-m' used for '--mode' argument, not '--medium' argument.
 1572 
 1573 =for rperl X</noncode>
 1574 
 1575 =back
 1576 
 1577 =for comment head2 B.28: Flags, High Magic
 1578 
 1579 =over
 1580 
 1581 =item B<--high>
 1582 
 1583 =for rperl X<noncode>
 1584 
 1585     Accept high-magic (dynamic) Perl source code in the source code input file(s).
 1586     Disabled by default, equivalent to '--mode magic=HIGH' argument.
 1587     Because only low-magic mode is supported at this time, this option does not currently have any effect.
 1588     Shorthand '-h' used for '--help' argument, not '--high' argument.
 1589 
 1590 =for rperl X</noncode>
 1591 
 1592 =back
 1593 
 1594 =for comment head2 B.29: Flags, Dependencies
 1595 
 1596 =over
 1597 
 1598 =item B<--dependencies ...OR... -d>
 1599 
 1600 =item B<--nodependencies ...OR... -nod>
 1601 
 1602 =for rperl X<noncode>
 1603 
 1604     Follow and compile dependencies, or not.
 1605     Enabled by default, equivalent to '--mode dependencies=ON' argument.
 1606     Lowercase 'd' not to be confused with uppercase 'D' in 'Debug' argument.
 1607 
 1608 =for rperl X</noncode>
 1609 
 1610 =back
 1611 
 1612 =for comment head2 B.30: Flags, Uncompile
 1613 
 1614 =over
 1615 
 1616 =item B<--uncompile ...OR... -u>
 1617 
 1618 =item B<--nouncompile ...OR... -nou>
 1619 
 1620 =item B<--uuncompile ...OR... -uu>
 1621 
 1622 =item B<--nouuncompile ...OR... -nouu>
 1623 
 1624 =item B<--uuuncompile ...OR... -uuu>
 1625 
 1626 =item B<--nouuncompile ...OR... -nouuu>
 1627 
 1628 =for rperl X<noncode>
 1629 
 1630     Uncompile (delete C++ source code and/or binary output files), or not.
 1631     Repeat as 'uu' and 'uuu' for more thorough file removal.
 1632     Do not confuse uncompile with decompile (recreate RPerl source code from C++ source code or binary output files), which does not currently exist.
 1633     '-u' equivalent to '--mode uncompile=SOURCE --mode compile=OFF --mode execute=OFF' arguments.
 1634     '-uu' equivalent to '--mode uncompile=SOURCE_BINARY --mode compile=OFF --mode execute=OFF' arguments.
 1635     '-uuu' equivalent to '--mode uncompile=SOURCE_BINARY_INLINE --mode compile=OFF --mode execute=OFF' arguments.
 1636     Disabled by default.
 1637 
 1638 =for rperl X</noncode>
 1639 
 1640 =back
 1641 
 1642 =for comment head2 B.31: Flags, Compile
 1643 
 1644 =over
 1645 
 1646 =item B<--compile ...OR... -c>
 1647 
 1648 =item B<--nocompile ...OR... -noc>
 1649 
 1650 =for rperl X<noncode>
 1651 
 1652     Generate & subcompile C++ source code, or not.
 1653     Enabled by default, equivalent to '--mode compile=SUBCOMPILE' argument.
 1654 
 1655 =for rperl X</noncode>
 1656 
 1657 =back
 1658 
 1659 =for comment head2 B.32: Flags, Subcompile, Assemble
 1660 
 1661 =over
 1662 
 1663 =item B<--assemble>
 1664 
 1665 =for rperl X<noncode>
 1666 
 1667     Assemble subcompile mode, output *.o object file(s).
 1668     If enabled, equivalent to '--mode subcompile=ASSEMBLE' argument or `gcc -c` manual subcompile argument.
 1669     Disabled by default.
 1670 
 1671 =for rperl X</noncode>
 1672 
 1673 =back
 1674 
 1675 =for comment head2 B.33: Flags, Subcompile, Archive
 1676 
 1677 =over
 1678 
 1679 =item B<--archive>
 1680 
 1681 =for rperl X<noncode>
 1682 
 1683     Archive subcompile mode, output *.a object archive file(s).
 1684     If enabled, equivalent to '--mode subcompile=ARCHIVE' argument or `gcc -c` followed by `ar` manual subcompile command.
 1685     Disabled by default.
 1686 
 1687 =for rperl X</noncode>
 1688 
 1689 =back
 1690 
 1691 =for comment head2 B.34: Flags, Subcompile, Shared Object
 1692 
 1693 =over
 1694 
 1695 =item B<--shared>
 1696 
 1697 =for rperl X<noncode>
 1698 
 1699     Shared subcompile mode, output *.so shared object file(s).
 1700     If enabled, equivalent to '--mode subcompile=SHARED' argument or `gcc -shared` manual subcompile command.
 1701     Disabled by default.
 1702 
 1703 =for rperl X</noncode>
 1704 
 1705 =back
 1706 
 1707 =for comment head2 B.35: Flags, Subcompile, Static
 1708 
 1709 =over
 1710 
 1711 =item B<--static>
 1712 
 1713 =item B<--nostatic>
 1714 
 1715 =for rperl X<noncode>
 1716 
 1717     Static subcompile mode, output *.exe or non-suffixed statically-linked executable file(s).
 1718     If disabled, equivalent to '--mode subcompile=DYNAMIC' argument or `gcc` manual subcompile command.
 1719     If enabled, equivalent to '--mode subcompile=STATIC' argument or `gcc -static` manual subcompile command.
 1720     Disabled by default.
 1721 
 1722 =for rperl X</noncode>
 1723 
 1724 =back
 1725 
 1726 =for comment head2 B.36: Flags, Parallelize
 1727 
 1728 =over
 1729 
 1730 =item B<--parallel ...OR... -p>
 1731 
 1732 =item B<--noparallel ...OR... -nop>
 1733 
 1734 =for rperl X<noncode>
 1735 
 1736     Automatically parallelize input code, or not.
 1737     Disabled by default.
 1738     Equivalent to '--mode parallel=OPENMP' argument.
 1739 
 1740 =for rperl X</noncode>
 1741 
 1742 =back
 1743 
 1744 =for comment head2 B.37: Flags, Execute
 1745 
 1746 =over
 1747 
 1748 =item B<--execute ...OR... -e>
 1749 
 1750 =item B<--noexecute ...OR... -noe>
 1751 
 1752 =for rperl X<noncode>
 1753 
 1754     Run input code after argumental compile, or not.
 1755     Enabled by default for *.pl program input files, always disabled for *.pm module input files or multiple input files.
 1756     Equivalent to '--mode execute=ON' argument.
 1757 
 1758 =for rperl X</noncode>
 1759 
 1760 =back
 1761 
 1762 =head1 DESCRIPTION
 1763 
 1764 B<RPerl> is a compiler.  For more info:
 1765 
 1766 L<https://github.com/wbraswell/rperl/blob/master/README.md>
 1767 
 1768 =head1 SEE ALSO
 1769 
 1770 L<RPerl>
 1771 
 1772 =head1 AUTHOR
 1773 
 1774 B<William N. Braswell, Jr.>
 1775 
 1776 L<mailto:wbraswell@NOSPAM.cpan.org>
 1777 
 1778 =cut