Permalink
Switch branches/tags
2016.01-preparation RT123215 RT132710-traits-from-all-multies RT132710-traits-warn-on-non-proto Routine_consolidate_flag_fields actions_shared alpha angular_bracket_literal_semantics arr-con-not-item awesome-malformed-loops better-O better-loop better_line_coverage birdless-2 birdless braids cache_most_common_cds callable-default-value callsite_flags_sso car-grant-unreduce claim-prototype coercer-fixes compiled-hyper-dispatch cont container-compare-metaop cpp cur-candidates curfs-candidates-refactor curly definedness_for_hash_and_arr_sigil dist_resources eval-server-improvements export-constant failed_match2Nil faster-permutations fix-Callable-composition fix-Hash-Mu-keys--RT-1357201 fix-R1723 fix-equiv fix-thunks fix_eval_in_precomp fix_precompilationstore_abstraction froggs_multibyte from_nqp generate_buildallplan generate_buildallplan_2 generate_buildallplan_3 glrish gmr hllbool hotfix-2015.01 hyper_threaded hyper_tracks_sequence_numbers inherit-from-nqp-class interface-inconsistency iterator_mixin_re-use jit_nativecall js jsoff json_timing_stuff jvm-begin-eval jvm-sockets jvm_interop_dispatchers jvmbl language_versions lazy-subst leave less-wrapping lex2loc2 lexical_module_load lexical_require lines-vm-chomp main_named_params master missing-clones moar-gen2-frame-opts moar/reframe monkey-implies-no-precomp more-local-lowering multidim named_pod_vars native-str-ops nativecall-cint nativecall_specialized_sub_bodies new-nil newio ng nil-assign nil-noniterable no-strict no-vm-at-startup no_p5_warnings nom nqp-dogfood nqp-lib-windows nqp-mbc optimize_for_again optimizer_lexicalref_lowering p6for_op parameter-perl parrot-690 parrot-icu-required parrot-iocleanup1-take2 platform_library_name pod-slang-tbrowder pod-table postrelease-opts pr/229 precomp-singleprocess-resurrection precomp-store-redesign priv-role-attrs prune_matches query_repos_old query_repos raccoon ratlab-fattish-rat recursive-gist regex_optimizer release/2015.07.2 relocateable-precomp remove-migration repo_v1 repository_registry rescalar resources return-type-check-plugin return-without-lexotic richer-positional role_diamond rt-127977 rt128156_fix_precomp_deps_validation safely_stringify_core_exceptions scientific-notation-using-div_In segv-coercer-qast setdispatcherfor setops sha1bin sigsp sink-phasers sized-arrays smile spacey spesh-plugins speshplugin_guardstaticcode staged-settings standalone-jar supplier-preserving-refactor support_meta_classes_written_in_perl6 support_perl6_meta_classes there_is_no_return tmp_highfive try-does-use-fatal tune-hash udp_receive_hostname_port undefinitehow-default-defaults unfaster-words unifyunit use-nqp varopt vmarray-list vmarray whenever_last_redo wip-openpipe worry_broken_heredoc_stopper
Nothing to show
Find file Copy path
150 lines (93 sloc) 5.1 KB

NAME

perl6 - Rakudo Perl 6 Compiler

SYNOPSIS

perl6 [switches] [--] [programfile] [arguments]

DESCRIPTION

With no arguments, enters a REPL. With a [programfile] or the -e option, compiles the given program and by default also executes the compiled code.

-c                   check syntax only (runs BEGIN and CHECK blocks)
--doc                extract documentation and print it as text
-e program           one line of program, strict is enabled by default
-h, --help           display this help text
-n                   run program once for each line of input
-p                   same as -n, but also print $_ at the end of lines
-I path              adds the path to the module search path
-M module            loads the module prior to running the program
--target=[stage]     specify compilation stage to emit
--optimize=[level]   use the given level of optimization (0..3)
--encoding=[mode]    specify string encoding mode
-o, --output=[name]  specify name of output file
-v, --version        display version information
--stagestats         display time spent in the compilation stages
--ll-exception       display a low level backtrace on errors
--profile            write profile information as HTML file (MoarVM)
--profile-filename   provide a different filename (also allows .json)
--doc=[module]       Use Pod::To::[module] to render inline documentation.

Note that only boolean single-letter options may be bundled.

The supported values for --target are:

Target     Backend  Description
======     =======  ===========
parse      all      a representation of the parse tree
ast        all      an abstract syntax tree (before optimizations)
optimize   all      an abstract syntax tree (after optimizations)

mbc        MoarVM   MoarVM byte code
jar        JVM      JVM archive

For --profile-filename, specifying a name ending in .json will write a raw JSON profile dump. The default if this is omitted is profile-[timestamp].html.

ENVIRONMENT VARIABLES

Rakudo's behavior can be tweaked by a (growing) number of environment variables; this section attempts to document all those currently in use.

Module Loading

RAKUDOLIB, PERL6LIB (Str; src/core/Inc.pm)

Appends a comma-delimited list of paths to @INC. RAKUDOLIB is evaluated first.

RAKUDO_MODULE_DEBUG (Bool; src/Perl6/ModuleLoader.pm)

Causes the module loader to print debugging information to standard error.

Error Message Verbosity and Strictness

RAKUDO_NO_DEPRECATIONS (Bool; src/core/Deprecations.pm)

If true, suppresses deprecation warnings triggered by the is DEPRECATED trait.

RAKUDO_DEPRECATIONS_FATAL (Bool; src/core/Deprecations.pm)

If true, deprecation warnings become thrown exceptions.

RAKUDO_VERBOSE_STACKFRAME (UInt; src/core/Backtrace.pm)

Displays source code in stack frames surrounded by the specified number of lines of context.

RAKUDO_BACKTRACE_SETTING (Bool; src/core/Backtrace.pm)

Controls whether .setting files are included in backtraces.

Affecting Precompilation

RAKUDO_PREFIX (Str; src/core/CompUnit/RepositoryRegistry.pm)

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 (src/core/CompUnit/PrecompilationRepository.pm)
RAKUDO_PRECOMP_LOADING (src/core/CompUnit/PrecompilationRepository.pm)
RAKUDO_PRECOMP_WITH (src/core/CompUnit/PrecompilationRepository.pm)

These are internal variables for passing serialized state to precompilation jobs in child processes. Please do not set them manually.

Other

RAKUDO_ERROR_COLOR (Bool; src/core/Exception.pm)

Controls whether to emit ANSI codes for error highlighting. Defaults to true if unset, except on Win32.

RAKUDO_MAX_THREADS (UInt; src/core/ThreadPoolScheduler.pm)

Override the default maximum number of threads used by a thread pool.

TMPDIR, TEMP, TMP (Str; src/core/IO/Spec/)

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 Win32-appropriate lists which also include the %TEMP% and %TMP% environment variables.

PATH, Path (Str; src/core/IO/Spec/)

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.

AUTHORS

Written by the Rakudo contributors, see the CREDITS file.

This manual page was written by Reini Urban, Moritz Lenz and the Rakudo contributors.