Skip to content

Commit

Permalink
Clarify versioning pragmas
Browse files Browse the repository at this point in the history
- Add more explanation for the whole "perl 5 errors" thing, as it's
   unclear unless you already know what it's about
- Explain more about .PREVIEW version, though its mechanics are
    slightly fuzzy around the edges: R#2464 rakudo/rakudo#2464
  • Loading branch information
zoffixznet committed Nov 2, 2018
1 parent 87061ec commit 94110a2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions doc/Language/pragmas.pod6
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,18 @@ are to be defined later.)
=item X<C<v6.x>|v6.x> This pragma states the version of the compiler that is going to be used,
and turns on its features if they are optional.
use v6; # Tells the Perl 5 interpreter this is not for it.
use v6.c; # Uses the "Christmas" version of Perl 6.
use v6.d.PREVIEW; # Turns on available "Diwali" features in v6.c
use v6.d; # Use "Diwali" features.
use v6; # Load latest supported version (non-PREVIEW).
# Also, useful for producing better errors when accidentally
# executing the program with `perl` instead of `perl6`
use v6.c; # Use the "Christmas" version of Perl 6
use v6.d; # Use the "Diwali" version of Perl 6
use v6.d.PREVIEW; # On 6.d-capable compilers, enabled 6.s features,
# otherwise enables the available experimental
# preview features for 6.d language
Since these pragmas turn on the compiler version, they should be the
first line in the file.
first statement in the file (preceeding comments and Pod are fine).
=item X<B<MONKEY-GUTS>|MONKEY-GUTS>
Expand Down

0 comments on commit 94110a2

Please sign in to comment.