CLI options#

pperl accepts a small set of command-line flags. Most are perl-compatible; a handful are pperl-specific (JIT, parallelism, runtime selection, bytecode cache). The authoritative list is whatever pperl --help prints; the tables below show those flags, extracted from the interpreter source and rendered here on every documentation build.

Note

The actual pperl --help output on the terminal is always in English - the binary does not localise help strings. Translated documentation shows the same flags with descriptions in the page’s language so readers can study what each flag does; flag tokens (-T, --threads=N, …) are always verbatim.

PetaPerl - Next-generation Perl 5 runtime

Usage#

pperl [OPTIONS] [--] [SCRIPT [ARGS...]]
pperl -e 'code'

Perl-compatible options#

Flag

Description

-e 'code'

Execute one-liner (modern features always enabled)

-Idirectory

Prepend directory to @INC

-c

Check syntax only, don’t execute

-w

Enable warnings

-n

Loop over input lines (no auto-print), like while(<>)

-p

Loop over input lines and auto-print, like a sed filter

-a

Autosplit each line into @F (with -n or -p)

-F pattern

Set the -a split pattern (implies -a)

-l[octal]

Auto-chomp input, set output record separator

-0[octal]

Set input record separator (-0 = NUL, -00 = paragraph)

-i[ext]

Edit files in place (optional backup extension)

-T

Taint mode (forced)

-t

Taint warnings

-v

Show version information

-V

Show detailed configuration

--interactive

Launch interactive REPL (requires ‘shell’ feature)

-h, -?, --help

Show this help message

Pperl-specific options#

Flag

Description

--from-json, -j

Read op tree from stdin (B::PetaPerl JSON format)

--optree, -o

Read op tree from stdin (B::Concise format)

--stats, -s

Show performance statistics (time, memory, ops)

--trace

Enable execution tracing (note: short -t is perl5 taint-warn)

--timeout=SECS

Set execution timeout in seconds (default: none)

--dump-optree

Dump canonical op tree (don’t execute)

--compare-bytecode

Compare op trees: perl5 backend vs native parser

--cache

Enable bytecode caching (~/.pperl/cache/)

--flush

Clear all bytecode caches and exit

Runtime options#

Flag

Description

--no-jit

Disable JIT compilation (on by default)

--no-parallel

Disable auto-parallelization (on by default)

--threads=N

Number of threads (default: all CPUs)

--parallel-threshold=N

Minimum iterations to parallelize (default: 100)

--jit-stats

Print JIT summary to stderr at exit (see also PPERL_JIT_LOG)

Examples#

pperl script.pl

Execute a Perl script

pperl -e 'say "Hello!"'

Execute a one-liner (say, state, etc. always available)

pperl -c script.pl

Check script syntax without executing

pperl script.pl arg1 arg2

Pass arguments to script (@ARGV)

For more information, see: https://gl.petatech.eu/petatech/peta-perl

Environment variables#

pperl sets several environment variables inside the process it runs, so scripts can introspect the running interpreter:

Variable

Meaning

PPERL

Version string (same as pperl -v)

PPERL_FEATURES

Comma-separated list of compiled-in Cargo features

PPERL_MODS

Comma-separated Name/version pairs for every native module

PPERL_SHELL

Shell integration flavor (empty if shell feature off)

PPERL_STATIC

yes if the binary is musl-statically linked, else no

Run pperl -V to see all values for the current binary.