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, --pp, --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

-T

Taint mode (forced; p5 runtime only — warns under –pp)

-t

Taint warnings (p5 runtime only — warns under –pp)

-v

Show version information

-V

Show detailed configuration

-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

--pp

Use pp runtime (native Rust parser + interpreter)

--p5

(default) Use p5 self-contained runtime

--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)

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_RUNTIMES

Comma-separated runtimes built in (p5, pp, or both)

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.

When to use --pp#

The default p5 runtime is the full-feature interpreter: every module available, JIT enabled, taint mode functional. --pp selects the native-Rust pp runtime — faster to start, smaller binary, but with a narrower module set and no JIT. Pick --pp for miniperl-style deployments or when the specific module you need is available in it (see the pp runtime badge on module pages).