The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

rperl Front-End Program

Restricted Perl, The Optimizing Perl 5 Compiler

SYNOPSIS

rperl [ARGUMENTS] input_program_0.pl [input_program_1.pl input_program_2.pl ...]
rperl [ARGUMENTS] MyClassFoo.pm [MyClassBar.pm MyClassBat.pm ...]
rperl [ARGUMENTS] input_program_0.pl MyClassFoo.pm [input_program_1.pl ... MyClassBar.pm ...]

ARGUMENTS

--help ...OR... -h ...OR... -?
Print this (relatively) brief help message for command-line usage.
For additional explanations, run the command `perldoc RPerl::Learning` and see Appendix B.
--version ...OR... -v
--vversion ...OR... -vv
Print version number and copyright information.
Repeat as 'vv' for more technical information, similar to `perl -V` configuration summary argument.
Lowercase 'v' not to be confused with uppercase 'V' in 'Verbose' argument.
--infile=MyFile.pm ...OR... -i=MyFile.pm
Specify input file, may be repeated for multiple input files.
Argument prefix '--infile' may be entirely omitted.
Argument prefix MUST be omitted to specify wildcard for multiple input files.
--outfile=MyCompiledModule ...OR... -o=MyCompiledModule
--outfile=my_compiled_program ...OR... -o=my_compiled_program
Specify output file prefix, may be repeated for multiple output files.
RPerl *.pm input file with PERL ops will create MyCompiledModule.pmc output file.
RPerl *.pl input file with PERL ops will create my_compiled_program (or my_compiled_program.exe on Windows) output file.
RPerl *.pm input file with CPP  ops will create MyCompiledModule.pmc, MyCompiledModule.cpp, & MyCompiledModule.h output files.
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.
Argument may be entirely omitted, foo.* input file will default to foo.* output file(s).
--CXX=/path/to/compiler
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.
--mode magic=LOW ...OR... -m magic=LOW
--mode magic=MEDIUM ...OR... -m magic=MEDIUM
--mode magic=HIGH ...OR... -m magic=HIGH
Specify magic mode, LOW by default.
If set to LOW, accept low-magic (static) Perl source code in the source code input file(s).
If set to MEDIUM, accept medium-magic (mostly static) Perl source code in the source code input file(s).
If set to HIGH, accept high-magic (dynamic) Perl source code in the source code input file(s).
Because only low-magic mode is supported at this time, this option does not currently have any effect.
--mode code=PERL ...OR... -m code=PERL
--mode code=CPP ...OR... -m code=CPP
Specify source code mode, CPP by default.
If set to PERL, generate Perl source code in the source code output file(s).
If set to CPP, generate C++ source code in the source code output file(s).
PERL operations mode forces PERL code mode; CPP operations mode forces CPP code mode.
Because code mode is dependent upon operations mode, this option does not currently have any effect.
--mode ops=PERL ...OR... -m ops=PERL
--mode ops=CPP ...OR... -m ops=CPP
Specify operations mode, CPP by default.
If set to PERL, generate Perl operations in the source code output file(s).
If set to CPP, generate C++ operations in the source code output file(s).
PERL ops mode forces PERL types mode & PARSE or GENERATE compile mode; PERLOPS_PERLTYPES is test mode, does not actually compile.
--mode types=PERL ...OR... -m types=PERL
--mode types=CPP ...OR... -m types=CPP
--mode types=DUAL ...OR... -m types=DUAL
Specify data types mode, CPP by default.
If set to PERL, generate Perl data types in the source code output file(s).
If set to CPP, generate C++ data types in the source code output file(s).
If set to DUAL, generate both Perl and C++ data types in the source code output file(s).
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.
--mode type_integer=LONG ...OR... -m type_integer=LONG
--mode type_integer=LONG__LONG ...OR... -m type_integer=LONG__LONG
Specify native C++ integer data type, same as internal Perl type by default.
If set to LONG, utilize 'long' as native type for 'integer', at least 32 bits;
If set to LONG__LONG, utilize 'long long' as native type for 'integer', at least 64 bits.
--mode type_number=DOUBLE ...OR... -m type_number=DOUBLE
--mode type_number=LONG__DOUBLE ...OR... -m type_number=LONG__DOUBLE
Specify native C++ number data type, same as internal Perl type by default.
If set to DOUBLE, utilize 'double' as native type for 'number', usually at least 32 bits, but not guaranteed;
If set to LONG__DOUBLE, utilize 'long double' as native type for 'number', usually at least 64 bits, but not guaranteed.
--mode check=OFF ...OR... -m check=OFF
--mode check=ON ...OR... -m check=ON
--mode check=TRACE ...OR... -m check=TRACE
Specify data type checking mode, TRACE by default.
If set to OFF, do not perform dynamic type checking, only built-in C++ static type checking.
If set to ON, perform dynamic type checking in addition to built-in C++ static type checking.
If set to TRACE, perform dynamic type checking in addition to built-in C++ static type checking, with subroutine-and-variable trace information.
--mode dependencies=OFF ...OR... -m dependencies=OFF
--mode dependencies=ON ...OR... -m dependencies=ON
Specify dependencies mode, ON by default.
If set to OFF, do not search for or compile dependencies.
If set to ON, recursively search for dependencies and subdependencies, include as additional input file(s).
WARNING: Disabling dependencies will likely cause errors or undefined behavior.
--mode uncompile=OFF ...OR... -m uncompile=OFF
--mode uncompile=SOURCE ...OR... -m uncompile=SOURCE
--mode uncompile=BINARY ...OR... -m uncompile=BINARY
--mode uncompile=INLINE ...OR... -m uncompile=INLINE
--mode uncompile=SOURCE_BINARY ...OR... -m uncompile=SOURCE_BINARY
--mode uncompile=SOURCE_BINARY_INLINE ...OR... -m uncompile=SOURCE_BINARY_INLINE
Specify uncompile mode, OFF by default.
If set to SOURCE, delete all generated C++ output source code (not subcompiled) files: *.cpp, *.h, *.pmc
If set to BINARY, delete all generated C++ output binary (subcompiled) files: *.o, *.a, *.so, *.exe, non-suffixed executables
If set to INLINE, delete all generated C++ output Inline::CPP files: _Inline/ directory
If set to SOURCE_BINARY, delete both SOURCE and BINARY files.
If set to SOURCE_BINARY_INLINE, delete SOURCE, BINARY, and INLINE files.
For *.pm Perl module input files, BINARY and INLINE are equivalent.
--mode compile=OFF ...OR... -m compile=OFF
--mode compile=PARSE ...OR... -m compile=PARSE
--mode compile=GENERATE ...OR... -m compile=GENERATE
--mode compile=SAVE ...OR... -m compile=SAVE
--mode compile=SUBCOMPILE ...OR... -m compile=SUBCOMPILE
Specify compile mode, SUBCOMPILE by default.
If set to PARSE, begin with RPerl input source code file(s), and end with RPerl abstract syntax tree output data structure.
If set to GENERATE, begin with RPerl input source code file(s), and end with RPerl and/or C++ output source code in memory.
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.
If set to SUBCOMPILE, begin with RPerl input source code file(s), and end with C++ output binary file(s).
--mode subcompile=OFF ...OR... -m subcompile=OFF
--mode subcompile=ASSEMBLE ...OR... -m subcompile=ASSEMBLE
--mode subcompile=ARCHIVE ...OR... -m subcompile=ARCHIVE
--mode subcompile=SHARED ...OR... -m subcompile=SHARED
--mode subcompile=STATIC ...OR... -m subcompile=STATIC
--mode subcompile=DYNAMIC ...OR... -m subcompile=DYNAMIC
Specify subcompile mode, DYNAMIC by default.
If set to ASSEMBLE, generate *.o object binary output file(s).
If set to ARCHIVE, generate *.a object archive binary output file(s).
If set to SHARED, generate *.so shared object binary output file(s).
If set to STATIC, generate statically-linked *.exe or non-suffixed executable binary output file(s).
If set to DYNAMIC, generate dynamically-linked *.exe or non-suffixed executable binary output file(s).
--mode CXX=/path/to/compiler ...OR... -m CXX=/path/to/compiler
Specify path to C++ compiler for use in subcompile modes, equivalent to '--CXX=/path/to/compiler' or 'CXX' manual Makefile argument, 'g++' by default.
--mode parallel=OFF ...OR... -m parallel=OFF
--mode parallel=OPENMP ...OR... -m parallel=OPENMP
--mode parallel=MPI ...OR... -m parallel=MPI ((( COMING SOON!!! )))
--mode parallel=OPENCL ...OR... -m parallel=OPENCL ((( COMING SOON!!! )))
Specify automatic parallelization mode, OFF by default.
If set to OFF, do not automatically parallelize any input files.
If set to OPENMP, automatically parallelize all eligible input files for use on shared-memory OpenMP systems.
If set to MPI (COMING SOON), automatically parallelize all eligible input files for use on distributed-memory MPI systems.
If set to OPENCL (COMING SOON), automatically parallelize all eligible input files for use on heterogeneous or GPU systems.
--mode num_cores=2 ...OR... -m num_cores=2 ...OR... --num_cores=2 ...OR... -num=2
--mode num_cores=4 ...OR... -m num_cores=4 ...OR... --num_cores=4 ...OR... -num=4
--mode num_cores=8 ...OR... -m num_cores=8 ...OR... --num_cores=8 ...OR... -num=8
...ETC...
Specify number of CPU cores to utilize for OPENMP automatic parallelization mode, 4 by default.
--mode execute=OFF ...OR... -m execute=OFF
--mode execute=ON ...OR... -m execute=ON
Specify execute mode, ON by default.
If set to OFF, do not load or run any user-supplied program(s).
If set to ON with one *.pl Perl program input file, load and run the program.
If set to ON with more than one *.pl Perl program input file, do not load or run any programs.
--mode label=OFF ...OR... -m label=OFF
--mode label=ON ...OR... -m label=ON
Specify source section label mode, ON by default.
If set to OFF, generate minimal output source code, may save disk space.
If set to ON, generate some informative labels in output source code, may be more human-readable.
--Verbose ...OR... -V
--noVerbose ...OR... -noV
Include additional user information in output, or not.
If enabled, equivalent to `export RPERL_VERBOSE=1` shell command.
Disabled by default.
Uppercase 'V' not to be confused with lowercase 'v' in 'version' argument.
--Debug ...OR... -D
--noDebug ...OR... -noD
Include debugging & system diagnostic information in output, or not.
If enabled, equivalent to `export RPERL_DEBUG=1` shell command.
Disabled by default.
Uppercase 'D' not to be confused with lowercase 'd' in 'dependencies' argument.
--Warnings ...OR... -W
--noWarnings ...OR... -noW
Include system warnings in output, or not.
If disabled, equivalent to `export RPERL_WARNINGS=0` shell command.
Enabled by default.
--test ...OR... -t
Test mode: Perl ops, Perl types, Parse & Generate (no Save or Compile)
If enabled, equivalent to '--mode ops=PERL --mode types=PERL --mode compile=GENERATE' arguments.
Disabled by default.
--low ...OR... -l
Accept low-magic (static) Perl source code in the source code input file(s).
Enabled by default, equivalent to '--mode magic=LOW' argument.
Because only low-magic mode is supported at this time, this option does not currently have any effect.
--medium
Accept medium-magic (mostly static) Perl source code in the source code input file(s).
Disabled by default, equivalent to '--mode magic=MEDIUM' argument.
Because only low-magic mode is supported at this time, this option does not currently have any effect.
Shorthand '-m' used for '--mode' argument, not '--medium' argument.
--high
Accept high-magic (dynamic) Perl source code in the source code input file(s).
Disabled by default, equivalent to '--mode magic=HIGH' argument.
Because only low-magic mode is supported at this time, this option does not currently have any effect.
Shorthand '-h' used for '--help' argument, not '--high' argument.
--dependencies ...OR... -d
--nodependencies ...OR... -nod
Follow and compile dependencies, or not.
Enabled by default, equivalent to '--mode dependencies=ON' argument.
Lowercase 'd' not to be confused with uppercase 'D' in 'Debug' argument.
--uncompile ...OR... -u
--nouncompile ...OR... -nou
--uuncompile ...OR... -uu
--nouuncompile ...OR... -nouu
--uuuncompile ...OR... -uuu
--nouuncompile ...OR... -nouuu
Uncompile (delete C++ source code and/or binary output files), or not.
Repeat as 'uu' and 'uuu' for more thorough file removal.
Do not confuse uncompile with decompile (recreate RPerl source code from C++ source code or binary output files), which does not currently exist.
'-u' equivalent to '--mode uncompile=SOURCE --mode compile=OFF --mode execute=OFF' arguments.
'-uu' equivalent to '--mode uncompile=SOURCE_BINARY --mode compile=OFF --mode execute=OFF' arguments.
'-uuu' equivalent to '--mode uncompile=SOURCE_BINARY_INLINE --mode compile=OFF --mode execute=OFF' arguments.
Disabled by default.
--compile ...OR... -c
--nocompile ...OR... -noc
Generate & subcompile C++ source code, or not.
Enabled by default, equivalent to '--mode compile=SUBCOMPILE' argument.
--assemble
Assemble subcompile mode, output *.o object file(s).
If enabled, equivalent to '--mode subcompile=ASSEMBLE' argument or `gcc -c` manual subcompile argument.
Disabled by default.
--archive
Archive subcompile mode, output *.a object archive file(s).
If enabled, equivalent to '--mode subcompile=ARCHIVE' argument or `gcc -c` followed by `ar` manual subcompile command.
Disabled by default.
--shared
Shared subcompile mode, output *.so shared object file(s).
If enabled, equivalent to '--mode subcompile=SHARED' argument or `gcc -shared` manual subcompile command.
Disabled by default.
--static
--nostatic
Static subcompile mode, output *.exe or non-suffixed statically-linked executable file(s).
If disabled, equivalent to '--mode subcompile=DYNAMIC' argument or `gcc` manual subcompile command.
If enabled, equivalent to '--mode subcompile=STATIC' argument or `gcc -static` manual subcompile command.
Disabled by default.
--parallel ...OR... -p
--noparallel ...OR... -nop
Automatically parallelize input code, or not.
Disabled by default.
Equivalent to '--mode parallel=OPENMP' argument.
--execute ...OR... -e
--noexecute ...OR... -noe
Run input code after argumental compile, or not.
Enabled by default for *.pl program input files, always disabled for *.pm module input files or multiple input files.
Equivalent to '--mode execute=ON' argument.

DESCRIPTION

RPerl is a compiler. For more info:

https://github.com/wbraswell/rperl/blob/master/README.md

SEE ALSO

RPerl

AUTHOR

William N. Braswell, Jr.

mailto:wbraswell@NOSPAM.cpan.org