=head1 NAME

perl6 - Rakudo Perl 6 Compiler

=head1 SYNOPSIS

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

=head1 DESCRIPTION

With no arguments, enters a REPL. With a C<[programfile]> or the C<-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
  -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
  --target=[stage]     specify compilation stage to emit
  -t, --trace=[flags]  enable trace flags, see 'parrot --help-debug'
  --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            print profile information to standard error

Note that only boolean single-letter options may be bundled

Output from C<--profile> can be visualized by C<kcachegrind>.

Supported stages for --target are:

 parse past post pir evalpmc

where

 parse = a representation of the parse tree
 past  = an intermediate format representing the parrot abstract syntax tree
 post  = an intermediate format representing the parrot opcode syntax tree
 pir   = the parrot intermediate representation

=head1 List of env vars used in Rakudo

=over

=item C<RAKUDOLIB>, C<PERL6LIB> (src/core/terms.pm)

Appends a delimited list of paths to C<@INC>. C<RAKUDOLIB> is evaluated first.

=item C<RAKUDO_MODULE_DEBUG> (src/Perl6/ModuleLoader.pm)

If set to a non-false value, causes the module loader to print debugging information to standard
error.

=item C<RAKUDO_ERROR_COLOR> (src/core/Exception.pm)

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

=back


=head1 PARROT OPTIONS

To specify options to the underlying parrot VM, you must explicitly run
parrot; you cannot specify these options by using the C<perl6> executable.

 parrot [parrot switches] perl6.pbc [switches] [--] [programfile] [arguments]

See C<parrot --help> for a list of valid parrot options.

=head1 AUTHORS

Written by the Rakudo contributors, see the CREDITS file.

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

=cut
