The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

kp6 - Frontend to the KindaPerl6 Perl 6 in Perl 6 compiler

SYNOPSIS

    kp6 [OPTIONS] < source.p6 > out.pl
    kp6 [OPTIONS] source.p6 > out.pl

    PERL5LIB=$(kp6 -lib) perl out.pl

OPTIONS

-h, --help

Print a usage message listing all available options

-v, --version

Print the version number, then exit successfully.

-r, --runtime

The runtime to use, defaults to mp6 but kp6 can also be selected. This option will go away when the compiler has been bootstraped to kp6.

--lib

Print the library path for the current runtime, this is mostly a hack at the moment until we have a decent interface to also execute code directly with the current backend, not just emit it.

--secure

Tell the emitter KindaPerl6::Visitor::Emit* emitter being used to disable any unsafe features (e.g. system).

--do

A comma seperated list of KindaPerl6::Visitors to use, some pre-made sequences (listed below) are also availible.

Example:

    # process the ast by expanding 'token' into plain Perl;
    # then replace method calls with MO calls;
    # then emit Perl 5 code
    kp6 --do Token,MetaClass,EmitPerl5 < examples/token.pl | perltidy
--ast

Dump the Abstract Syntax Tree of the program, see KindaPerl::Ast and KindaPerl::Visitor::Perl.

--perl5

Emit Perl 5 code via KindaPerl::Visitor::EmitPerl5, this is not the same thing as the default Perl 5 sequence which has more visitors.

--perl5rx

Use the KindaPerl6::Visitor::EmitPerl5Regex Perl 6 to Perl 5 regex emitter.

--perl6

Emit Perl 6 via KindaPerl6::Visitor::EmitPerl6.

--parrot

Emit PIR via KindaPerl6::Visitor::Parrot, currently broken.

--lisp

Emit Common Lisp via KindaPerl6::Visitor::Lisp.

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 10:

=begin without a target?