Skip to content

Commit 9620186

Browse files
committed
Fix code blocks explaining $!.
This corrects my mistakes around two blocks from commit a06f33a, as for discussion a06f33a#commitcomment-26642734 this commit does: - remove the :skip-test around the try code block, since it can be tested; - add a =for code directive with shell language around the output code block.
1 parent 8effa85 commit 9620186

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

doc/Language/5to6-perlvar.pod6

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ or L<exception|/type/Exception>.
530530
In particular, when dealing with L<exceptions|/type/Exception> the C<$!> provides information
531531
about the thrown exception, assuming the program has not halted:
532532
533-
=begin code :skip-test
533+
=begin code
534534
try {
535535
fail "Boooh";
536536
CATCH {
@@ -550,10 +550,11 @@ say $!.^name ~ ' : ' ~ $!.message;
550550
551551
and the above code produces the following output
552552
553-
within the catch:
554-
X::AdHoc : Boooh
555-
outside the catch:
556-
X::AdHoc : Boooh
553+
=for code :lang<shell>
554+
within the catch:
555+
X::AdHoc : Boooh
556+
outside the catch:
557+
X::AdHoc : Boooh
557558
558559
therefore, as stated before, the C<$!> variable holds the exception object.
559560

0 commit comments

Comments
 (0)