Shell environment variables used by Raku
The variables you can declare to alter its behavior or gather additional information.
0.1 | Module loading |
0.2 | Error message verbosity and strictness |
0.3 | Affecting precompilation |
0.4 | Line editor |
0.5 | Other |
1 | AUTHORS |
The behavior of Rakudo, the Raku interpreter, can be tweaked by a (growing) number of environment variables; this section attempts to document all those currently in use. They are interpreter specific in all cases, except where some use conventional names such as PATH
.
The underlying virtual machine is also sensitive to a series of environment variables; they are listed in this wiki page.
Module loading
RAKUDOLIB
,PERL6LIB
RAKUDOLIB
and PERL6LIB
append a comma-delimited list of paths to the search list for modules. RAKUDOLIB
is evaluated first.
RAKUDO_MODULE_DEBUG
If true, causes the module loader to print debugging information to standard error.
Error message verbosity and strictness
RAKU_EXCEPTIONS_HANDLER
If present, the print_exception
routine will use a class of that name to process the exception for output. Rakudo currently ships with Exceptions::JSON
(invoked by setting this variable to JSON
), to override the default output. NOTE: this env var was added in version 6.e. Early implementation has been available in Rakudo compiler as of version 2019.12, and before that it was available as PERL6_EXCEPTIONS_HANDLER
.
RAKUDO_NO_DEPRECATIONS
If true, suppresses deprecation warnings triggered by the is DEPRECATED
trait.
RAKUDO_DEPRECATIONS_FATAL
If true, deprecation warnings become thrown exceptions.
RAKUDO_VERBOSE_STACKFRAME
Displays source code in stack frames surrounded by the specified number of lines of context; for instance RAKUDO_VERBOSE_STACKFRAME = 1
will use one context line.
RAKUDO_BACKTRACE_SETTING
Controls whether .setting
files are included in backtraces.
Affecting precompilation
RAKUDO_PREFIX
When this is set, Rakudo will look for the standard repositories (perl, vendor, site) in the specified directory. This is intended as an escape hatch for build-time bootstrapping issues, where Rakudo may be built as an unprivileged user without write access to the runtime paths in NQP's config.
RAKUDO_PRECOMP_DIST
,RAKUDO_PRECOMP_LOADING
RAKUDO_PRECOMP_WITH
:
These are internal variables for passing serialized state to precompilation jobs in child processes. Please do not set them manually.
RAKUDO_LOG_PRECOMP
If set to 1, diagnostic information about the precompilation process is emitted.
Line editor
RAKUDO_LINE_EDITOR
This specifies the preferred line editor to use; valid values are Readline
, Linenoise
, and none. A value of none is useful if you want to avoid the recommendation message upon REPL startup.
RAKUDO_DISABLE_MULTILINE
If set to 1, will disable multiline input for the REPL.
RAKUDO_HIST
This specifies the location of the history file used by the line editor; the default is ~/.perl6/rakudo-history
.
Other
RAKUDO_DEFAULT_READ_ELEMS
This specifies the default number of characters to read on an IO::Handle
by setting the $*DEFAULT-READ-ELEMS
dynamic variable.
RAKUDO_ERROR_COLOR
Controls whether to emit ANSI codes for error highlighting. Defaults to true if unset, except on Windows.
RAKUDO_MAX_THREADS
Indicates the maximum number of threads used by default when creating a ThreadPoolScheduler
. Defaults to 64.
TMPDIR
,TEMP
,TMP
:
The IO::Spec::Unix.tmpdir
method will return $TMPDIR
if it points to a directory with full access permissions for the current user, with a fallback default of '/tmp'
.
IO::Spec::Cygwin
and IO::Spec::Win32
use more Windows-appropriate lists which also include the %TEMP%
and %TMP%
environment variables.
PATH
,Path
The IO::Spec::Unix.path
method splits $PATH
as a shell would; i.e. as a colon-separated list. IO::Spec::Cygwin
inherits this from IO::Spec::Unix
. IO::Spec::Win32.path
will read the first defined of either %PATH%
or %Path%
as a semicolon-delimited list.
RAKUDO_SNAPPER
Indicates the period in which the telemetry snapper will take a snapshot. Defaults to .1 for 10 snapshots per second.
AUTHORS
Initial version written by the Rakudo contributors, see the CREDITS file.
The initial version of this manual page was written by Reini Urban, Moritz Lenz and the Rakudo contributors.