Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Documents v6.whatever
As a pragma, with some examples. Closes #2422
  • Loading branch information
JJ committed Nov 2, 2018
1 parent ec633ca commit e26aafe
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions doc/Language/pragmas.pod6
Expand Up @@ -4,10 +4,10 @@
=SUBTITLE Special modules for special use
In Perl 6, B<pragmas> are directive used to either identify a
specific version of Perl 6 to be used or to modify the compiler's
normal behavior in some way. The C<use> keyword enables a pragma (similar
to how you can C<use> a module). To disable a pragma, use the C<no> keyword:
In Perl 6, B<pragmas> are directive used to either identify a specific
version of Perl 6 to be used or to modify the compiler's normal behavior
in some way. The C<use> keyword enables a pragma (similar to how you can
C<use> a module). To disable a pragma, use the C<no> keyword:
=begin code
use v6.c; # use 6.c language version
Expand All @@ -19,8 +19,17 @@ pragma's purpose or a link to more details about its use. (Note:
Pragmas marked "[NYI]" are not yet implemented, and those marked "[TBD]"
are to be defined later.)
=comment The following should be a table but formatting in tables is
not yet rendered properly.
=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.
Since these pragmas turn on the compiler version, they should be the
first line in the file.
=item X<B<MONKEY-GUTS>|MONKEY-GUTS>
Expand Down

0 comments on commit e26aafe

Please sign in to comment.