perl6 - perl6 driver program
perl6 [ p6c-options ] [ imcc-options ] [ asm-options ] [ run-options ] [ global-options ] file ...
perl6 --clean *.p6
perl6 --test [testfiles...]
perl6 calls all the appropriate stages to parse, assemble and run a perl6 source file. As these steps evolve this program will, or it will be garbage collected sometime in the future.
If called with .imc, .pasm or .pbc files, the appropriate pass(es) will be run.
These options are for the parser P6C and for output generation.
Compile to executable and run native. See also Run options below.
Stop after creating .pbc file.
Stop after creating .imc file.
Stop after creating parse tree, do not generate .imc output.
Output raw parser tree, additionally to parse tree.
Keep intermediate file.ext. If perl6 stops with an error or with above options, temp files are always kept. The last output step (.pmc or executable) is of course kept.
Keep all intermediate files.
Unlink all files perl6 might have generated (see FILES below), except those to --keep, e.g.
perl6 file.p6 --clean --keep-exe
Run tests like "make test". As the program startup and parser generation are done only once, with this option tests run much faster.
Interactive parser-testing mode. The parser enters an interactive mode. An empty line sends input to the parser.
Generate debug info. This adds #line n "file" and source comments to the .imc file.
Set $::RD_TRACE. You know what it is when you want this.
Keep track of %item hash. (only useful when constructing parser)
Rebuild grammar even if it exists.
Use precompiled grammar NAME (default = Perl6grammar)
Start with rule NAME (default = 'prog') (only useful in interactive mode)
Write various debug messages to STDERR.
Show bison's debug output
Preprocess input files and terminate processing.
Print this message.
Write output to file F.
Check syntax only, do not generate bytecode.
Run the .pbc file directly if it does exist and is not older then the .p6 source file.
pass option(s) to parrot, see parrot -h.
e.g. "perl6 -Rb. ..." calls "parrot -b -. ..."
Run against shared dynamic libparrot - you must currently build it manually in parrot root with:
cd ../.. make libparrot.a # static lib make shared # dynamic lib cd - # back to perl6 # and set this LD_LIBRARY_PATH # as libparrot.so is not installed during testing # export LD_LIBRARY_PATH=../../blib/lib
Don't report non zero exit codes. This is needed e.g. for make test, when native code is tested.
Remove executables after running. This is useful for testnative.
Print this message and exit
Print mesages about compile stages
Be more verbose, print intermediate stages.
Print versions to STDOUT and exit
Print warnings. If »-w« is off, warnings are collected in file.warn.
Print diagnostics. N/Y.
Zero means successful compilation/run.
Parse, assemble and run »foo.pl«, warnings and errors will go to »foo.warn«. Intermediate files are »foo.*«, s. FILES below.
Show individual steps, display warning, intermediate files are named »a.*«.
Assemble and run mops.pasm.
As perl6 is written in perl5, see perldoc perlrun. No environment vars are used currently.
Perl6 process the following files:
file.p6 ... perl6 source file.imc ... intermediate compiler code file.pasm ... parrot assember code file.pbc ... parrot byte code
The following files may be generated too:
file.warn ... various warnings and errors during all stages file.tree ... parser tree (--tree) file.c file.o file ... with option -C or file.exe depending on $^O file.out ... perl6 --test result file file.test ... perl6 --test Test::Harness input
Additionally the following files are cleaned by --clean
file.trace $ ../../parrot -t file.pbc 2> file.trace file.diss $ ../../disassemble file.pbc > file.diss
If STDIN in processed, the filebase "a" will be used.
Have a look at the individual stages:
P6C ... perl6 parser, imc generator imcc ... intermediate code compiler, which is really: parrot ... byte code interpreter
Parrot::Config doesn't provide all info needed to run, so there are some hard coded values at the beginning of the program.
When a intermediate stage dumps core, the message is not in file.warn.
- clean up the option handling, parrot hash long options now - Check for core files, and optionally get backtrace - clean up source file - more use of Parrot::Config - filter warnings/diagnostics ... -Wofile -W/frompat/../topat/ (grep expr)
Leopold Tötsch <lt@toetsch.at>
With a lot of help Sean O'Rourke and parts from his prd-perl6.pl.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '»-w«'. Assuming CP1252
To install Make, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Make
CPAN shell
perl -MCPAN -e shell install Make
For more information on module installation, please visit the detailed CPAN module installation guide.