1perl6(1) User Contributed Perl Documentation perl6(1)
2
3
4
6 perl6 - Rakudo Perl 6 Compiler
7
9 perl6 [switches] [--] [programfile] [arguments]
10
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
35 Note that only boolean single-letter options may be bundled.
36
37 The supported values for "--target" are:
38
39 Target Backend Description
40 ====== ======= ===========
41 parse all a representation of the parse tree
42 ast all an abstract syntax tree (before optimizations)
43 optimize all an abstract syntax tree (after optimizations)
44
45 mbc MoarVM MoarVM byte code
46 jar JVM JVM archive
47
48 For "--profile-filename", specifying a name ending in ".json" will
49 write a raw JSON profile dump. The default if this is omitted is
50 "profile-[timestamp].html".
51
53 Rakudo's behavior can be tweaked by a (growing) number of environment
54 variables; this section attempts to document all those currently in
55 use.
56
57 Module Loading
58 "RAKUDOLIB", "PERL6LIB" (Str; src/core/Inc.pm)
59 Appends a comma-delimited list of paths to @INC. "RAKUDOLIB" is
60 evaluated first.
61
62 "RAKUDO_MODULE_DEBUG" (Bool; src/Perl6/ModuleLoader.pm)
63 Causes the module loader to print debugging information to standard
64 error.
65
66 Error Message Verbosity and Strictness
67 "RAKUDO_NO_DEPRECATIONS" (Bool; src/core/Deprecations.pm)
68 If true, suppresses deprecation warnings triggered by the "is
69 DEPRECATED" trait.
70
71 "RAKUDO_DEPRECATIONS_FATAL" (Bool; src/core/Deprecations.pm)
72 If true, deprecation warnings become thrown exceptions.
73
74 "RAKUDO_VERBOSE_STACKFRAME" (UInt; src/core/Backtrace.pm)
75 Displays source code in stack frames surrounded by the specified
76 number of lines of context.
77
78 "RAKUDO_BACKTRACE_SETTING" (Bool; src/core/Backtrace.pm)
79 Controls whether .setting files are included in backtraces.
80
81 Affecting Precompilation
82 "RAKUDO_PREFIX" (Str; src/core/CompUnit/RepositoryRegistry.pm)
83 When this is set, Rakudo will look for the standard repositories
84 (perl, vendor, site) in the specified directory. This is intended
85 as an escape hatch for build-time bootstrapping issues, where
86 Rakudo may be built as an unprivileged user without write access to
87 the runtime paths in NQP's config.
88
89 "RAKUDO_PRECOMP_DIST" (src/core/CompUnit/PrecompilationRepository.pm)
90 "RAKUDO_PRECOMP_LOADING"
91 (src/core/CompUnit/PrecompilationRepository.pm)
92 "RAKUDO_PRECOMP_WITH" (src/core/CompUnit/PrecompilationRepository.pm)
93 These are internal variables for passing serialized state to
94 precompilation jobs in child processes. Please do not set them
95 manually.
96
97 Other
98 "RAKUDO_ERROR_COLOR" (Bool; src/core/Exception.pm)
99 Controls whether to emit ANSI codes for error highlighting.
100 Defaults to true if unset, except on Win32.
101
102 "RAKUDO_MAX_THREADS" (UInt; src/core/ThreadPoolScheduler.pm)
103 Override the default maximum number of threads used by a thread
104 pool.
105
106 "TMPDIR", "TEMP", "TMP" (Str; src/core/IO/Spec/)
107 The "IO::Spec::Unix.tmpdir" method will return $TMPDIR if it points
108 to a directory with full access permissions for the current user,
109 with a fallback default of '/tmp'.
110
111 "IO::Spec::Cygwin" and "IO::Spec::Win32" use more Win32-appropriate
112 lists which also include the "%TEMP%" and "%TMP%" environment
113 variables.
114
115 "PATH", "Path" (Str; src/core/IO/Spec/)
116 The "IO::Spec::Unix.path" method splits $PATH as a shell would;
117 i.e. as a colon-separated list. "IO::Spec::Cygwin" inherits this
118 from "IO::Spec::Unix".
119
120 "IO::Spec::Win32.path" will read the first defined of either
121 "%PATH%" or "%Path%" as a semicolon-delimited list.
122
124 Written by the Rakudo contributors, see the CREDITS file.
125
126 This manual page was written by Reini Urban, Moritz Lenz and the Rakudo
127 contributors.
128
129
130
131perl v5.28.1 2019-03-07 perl6(1)