1perl6(1)              User Contributed Perl Documentation             perl6(1)
2
3
4

NAME

6       raku - Rakudo Raku Compiler
7

SYNOPSIS

9        raku [switches] [--] [programfile] [arguments]
10

DESCRIPTION

12       With no arguments, enters a REPL. With a "[programfile]" or the "-e"
13       option, compiles the given program and by default also executes the
14       compiled code.
15
16         -c                   check syntax only (runs BEGIN and CHECK blocks)
17         --doc                extract documentation and print it as text
18         -e program           one line of program, strict is enabled by default
19         -h, --help           display this help text
20         -n                   run program once for each line of input
21         -p                   same as -n, but also print $_ at the end of lines
22         -I path              adds the path to the module search path
23         -M module            loads the module prior to running the program
24         --target=[stage]     specify compilation stage to emit
25         --optimize=[level]   use the given level of optimization (0..3)
26         --encoding=[mode]    specify string encoding mode
27         -o, --output=[name]  specify name of output file
28         -v, --version        display version information
29         --stagestats         display time spent in the compilation stages
30         --ll-exception       display a low level backtrace on errors
31         --profile            write profile information as HTML file (MoarVM)
32         --profile-filename   provide a different filename (also allows .json)
33         --doc=[module]       Use Pod::To::[module] to render inline documentation.
34         --full-cleanup       try to free all memory and exit cleanly (MoarVM)
35         --debug-port=port    listen for incoming debugger connections (MoarVM)
36         --debug-suspend      pause execution at the entry point (MoarVM)
37         --tracing            output a line to stderr on every interpreter instr (only
38                              if enabled in MoarVM)
39
40       Note that only boolean single-letter options may be bundled.
41
42       The supported values for "--target" are:
43
44        Target     Backend  Description
45        ======     =======  ===========
46        parse      all      a representation of the parse tree
47        ast        all      an abstract syntax tree (before optimizations)
48        optimize   all      an abstract syntax tree (after optimizations)
49
50        mbc        MoarVM   MoarVM byte code
51        jar        JVM      JVM archive
52
53       For "--profile-filename", specifying a name ending in ".json" will
54       write a raw JSON profile dump.  The default if this is omitted is
55       "profile-[timestamp].html".
56

ENVIRONMENT VARIABLES

58       Rakudo's behavior can be tweaked by a (growing) number of environment
59       variables; this section attempts to document all those currently in
60       use.
61
62   Module Loading
63       "RAKUDOLIB", "RAKULIB" (Str; src/core/Inc.pm)
64           Appends a comma-delimited list of paths to @INC. "RAKUDOLIB" is
65           evaluated first.
66
67       "RAKUDO_MODULE_DEBUG" (Bool; src/Perl6/ModuleLoader.nqp)
68           Causes the module loader to print debugging information to standard
69           error.
70
71   Error Message Verbosity and Strictness
72       "RAKUDO_NO_DEPRECATIONS" (Bool; src/core.c/Deprecations.pm6)
73           If true, suppresses deprecation warnings triggered by the "is
74           DEPRECATED" trait.
75
76       "RAKUDO_DEPRECATIONS_FATAL" (Bool; src/core.c/Deprecations.pm6)
77           If true, deprecation warnings become thrown exceptions.
78
79       "RAKUDO_VERBOSE_STACKFRAME" (UInt; src/core.c/Backtrace.pm6)
80           Displays source code in stack frames surrounded by the specified
81           number of lines of context.
82
83       "RAKUDO_BACKTRACE_SETTING" (Bool; src/core.c/Backtrace.pm6)
84           Controls whether .setting files are included in backtraces.
85
86   Affecting Precompilation
87       "RAKUDO_PREFIX" (Str; src/core.c/CompUnit/RepositoryRegistry.pm6)
88           When this is set, Rakudo will look for the standard repositories
89           (perl, vendor, site) in the specified directory. This is intended
90           as an escape hatch for build-time bootstrapping issues, where
91           Rakudo may be built as an unprivileged user without write access to
92           the runtime paths in NQP's config.
93
94       "RAKUDO_PRECOMP_DIST"
95       (src/core.c/CompUnit/PrecompilationRepository.pm6)
96       "RAKUDO_PRECOMP_LOADING"
97       (src/core.c/CompUnit/PrecompilationRepository.pm6)
98       "RAKUDO_PRECOMP_WITH"
99       (src/core.c/CompUnit/PrecompilationRepository.pm6)
100           These are internal variables for passing serialized state to
101           precompilation jobs in child processes.  Please do not set them
102           manually.
103
104   Other
105       "RAKUDO_ERROR_COLOR" (Bool; src/core.c/Exception.pm6)
106           Controls whether to emit ANSI codes for error highlighting.
107           Defaults to true if unset, except on Win32.
108
109       "RAKUDO_MAX_THREADS" (UInt; src/core.c/ThreadPoolScheduler.pm6)
110           Override the default maximum number of threads used by a thread
111           pool.
112
113       "TMPDIR", "TEMP", "TMP" (Str; src/core.c/IO/Spec/)
114           The "IO::Spec::Unix.tmpdir" method will return $TMPDIR if it points
115           to a directory with full access permissions for the current user,
116           with a fallback default of '/tmp'.
117
118           "IO::Spec::Cygwin" and "IO::Spec::Win32" use more Win32-appropriate
119           lists which also include the "%TEMP%" and "%TMP%" environment
120           variables.
121
122       "PATH", "Path" (Str; src/core.c/IO/Spec/)
123           The "IO::Spec::Unix.path" method splits $PATH as a shell would;
124           i.e. as a colon-separated list.  "IO::Spec::Cygwin" inherits this
125           from "IO::Spec::Unix".
126
127           "IO::Spec::Win32.path" will read the first defined of either
128           "%PATH%" or "%Path%" as a semicolon-delimited list.
129
130       "RAKU_HOME"
131           Allows to override the Raku installation path. Defaults to
132           "[rakudo_executable_dir]/../share/perl6".
133
134       "NQP_HOME"
135           Allows to override the NQP installation path. Defaults to
136           "[rakudo_executable_dir]/../share/nqp".
137

AUTHORS

139       Written by the Rakudo contributors, see the CREDITS file.
140
141       This manual page was written by Reini Urban, Moritz Lenz and the Rakudo
142       contributors.
143
144
145
146perl v5.34.1                      2022-06-24                          perl6(1)
Impressum