6
6
7
7
In Perl 6, B < pragmas > are core modules used to either identify a
8
8
specific version of Perl 6 to be used or to modify its normal behavior
9
- in some way. They are " use"ed in your code just as normal modules:
9
+ in some way. They are C < use > d in your code just as normal modules:
10
10
11
11
= begin code
12
12
use v6.c;
@@ -41,9 +41,9 @@ block below reaches the C<say $x.^name;> line and prints C<Failure> in output.
41
41
42
42
In the second block, the C < use fatal > pragma is enabled, so the C < say > line is
43
43
never reached because the L < Exception > contained in the L < Failure > returned from
44
- prefix C < + > gets thrown and the C < CATCH > block gets run, printing the C < Caught... >
45
- line. Note that both blocks are the same program and C < use fatal > only affects
46
- the lexical block it was used in:
44
+ prefix C < + > gets thrown and the C < CATCH > block gets run, printing the
45
+ C < Caught... > line. Note that both blocks are the same program and C < use fatal >
46
+ only affects the lexical block it was used in:
47
47
48
48
{
49
49
my $x = +"a";
@@ -58,8 +58,9 @@ the lexical block it was used in:
58
58
CATCH { default { say "Caught {.^name}" } }
59
59
} # OUTPUT: «Caught X::Str::Numeric»
60
60
61
- Inside of a L « C < try > blocks|/language/exceptions#index-entry-try_blocks-try» , the
62
- C < fatal > pragma is enabled by default, and you can I < disable > it with C < no fatal > :
61
+ Inside L « C < try > blocks|/language/exceptions#index-entry-try_blocks-try» , the
62
+ C < fatal > pragma is enabled by default, and you can I < disable > it with C < no
63
+ fatal > :
63
64
64
65
try {
65
66
my $x = +"a";
0 commit comments