Permalink
Branch: master
Find file Copy path
9900c9a Dec 2, 2018
3 contributors

Users who have contributed to this file

@JJ @finanalyst @zoffixznet
114 lines (70 sloc) 4.36 KB
=begin pod
=TITLE Shell environment variables used by Perl 6
=SUBTITLE What variables you can declare to alter its behavior.
The behavior of the interpreter can be tweaked by a (growing) number of
environment variables; this section attempts to document all those currently in
use. All these variables correspond to the L<Rakudo|https://rakudo.org>, and
they are interpreter specific in all cases, except where some use conventional
names such as C<PATH>.
The underlying virtual machine is also sensitive to a series of environment variables, they are listed L<in this wiki page|https://github.com/rakudo/rakudo/wiki/dev-env-vars#moarvm>
=head2 Module Loading
=item C<RAKUDOLIB>, C<PERL6LIB> Appends a comma-delimited list of paths to C<@INC>. C<RAKUDOLIB> is evaluated first.
=item C<RAKUDO_MODULE_DEBUG> Causes the module loader to print debugging
information to standard error.
=head2 Error Message Verbosity and Strictness
=item C<PERL6_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 C<JSON>, to
override the default output. B<NOTE:> this env var was added in 6.d language.
Early implementation is available in Rakudo compiler as of version 2018.08,
and before that it was available as C<RAKUDO_EXCEPTIONS_HANDLER>.
=item C<RAKUDO_NO_DEPRECATIONS>
If true, suppresses deprecation warnings triggered by the C<is DEPRECATED>
trait.
=item C<RAKUDO_DEPRECATIONS_FATAL>
If true, deprecation warnings become thrown exceptions.
=item C<RAKUDO_VERBOSE_STACKFRAME>
Displays source code in stack frames surrounded by the specified number of lines of context.
=item C<RAKUDO_BACKTRACE_SETTING>
Controls whether .setting files are included in backtraces.
=head2 Affecting Precompilation
=item C<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.
=item C<RAKUDO_PRECOMP_DIST>, C<RAKUDO_PRECOMP_LOADING> C<RAKUDO_PRECOMP_WITH>: These are internal variables for passing serialized state to precompilation jobs in child processes. Please do not set them manually.
=item C<RAKUDO_LOG_PRECOMP> If set to 1, diagnostic information about the precompilation process is emitted.
=head2 Line editor
=item C<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.
=item C<RAKUDO_DISABLE_MULTILINE> Set to 1, will disable multiline input for the REPL
=item C<RAKUDO_HIST> This specifies the location of the history file used by the
line editor; the default is C<~/.perl6/rakudo-history>.
=head2 Other
=item C<RAKUDO_DEFAULT_READ_ELEMS> Defaults to 65536; the default number of
characters to read on an IO::Handle.
=item C<RAKUDO_ERROR_COLOR> Controls whether to emit ANSI codes for error
highlighting. Defaults to true if unset, except on Win32.
=item C<RAKUDO_MAX_THREADS>
Override the default maximum number of threads used by a thread pool.
=item C<TMPDIR>, C<TEMP>, C<TMP>
The C<IO::Spec::Unix.tmpdir> method will return C<$TMPDIR> if it points to a directory with full
access permissions for the current user, with a fallback default of C<'/tmp'>.
C<IO::Spec::Cygwin> and C<IO::Spec::Win32> use more Win32-appropriate lists which also include the
C<%TEMP%> and C<%TMP%> environment variables.
=item C<PATH>, C<Path> The C<IO::Spec::Unix.path> method splits C<$PATH> as a
shell would; i.e. as a colon-separated list. C<IO::Spec::Cygwin> inherits this
from C<IO::Spec::Unix>. C<IO::Spec::Win32.path> will read the first defined of
either C<%PATH%> or C<%Path%> as a semicolon-delimited list.
=item C<RAKUDO_SNAPPER> affects the period in which the telemetry snapper
activates.
=head1 AUTHORS
Initial version written by the Rakudo contributors, see the
L<CREDITS file|https://github.com/rakudo/rakudo/blob/master/CREDITS>.
The L<initial version of this manual page|https://github.com/rakudo/rakudo/blob/master/docs/running.pod>
was written by Reini Urban, Moritz Lenz and the Rakudo
contributors.
=end pod
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6