Skip to content

Commit 94110a2

Browse files
authored
Clarify versioning pragmas
- 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
1 parent 87061ec commit 94110a2

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

doc/Language/pragmas.pod6

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,18 @@ are to be defined later.)
2222
=item X<C<v6.x>|v6.x> This pragma states the version of the compiler that is going to be used,
2323
and turns on its features if they are optional.
2424
25-
use v6; # Tells the Perl 5 interpreter this is not for it.
26-
use v6.c; # Uses the "Christmas" version of Perl 6.
27-
use v6.d.PREVIEW; # Turns on available "Diwali" features in v6.c
28-
use v6.d; # Use "Diwali" features.
25+
use v6; # Load latest supported version (non-PREVIEW).
26+
# Also, useful for producing better errors when accidentally
27+
# executing the program with `perl` instead of `perl6`
28+
29+
use v6.c; # Use the "Christmas" version of Perl 6
30+
use v6.d; # Use the "Diwali" version of Perl 6
31+
use v6.d.PREVIEW; # On 6.d-capable compilers, enabled 6.s features,
32+
# otherwise enables the available experimental
33+
# preview features for 6.d language
2934
3035
Since these pragmas turn on the compiler version, they should be the
31-
first line in the file.
32-
36+
first statement in the file (preceeding comments and Pod are fine).
3337
3438
=item X<B<MONKEY-GUTS>|MONKEY-GUTS>
3539

0 commit comments

Comments
 (0)