Skip to content

Commit

Permalink
Adds link and rephrases closes #2401
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ committed Oct 21, 2018
1 parent a148052 commit 5811e64
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
21 changes: 12 additions & 9 deletions doc/Language/routines.pod6
Expand Up @@ -16,18 +16,21 @@ Defined as:
sub exit(Int() $status = 0)
Exits the current process with return code C<$status> or zero if no value has
been specified. The exit value (C<$status>), when different from zero, has to be
opportunely evaluated from the process that catches it (e.g., a shell).
Exits the current process with return code C<$status> or zero if no
value has been specified. The exit value (C<$status>), when different
from zero, has to be opportunely evaluated from the process that catches
it (e.g., a shell); it is the only way to return an exit code different
from zero from a L<Main|/routine/MAIN>.
C<exit> does prevent the L<LEAVE|/language/phasers#LEAVE> phaser to be executed.
C<exit> prevents the L<LEAVE|/language/phasers#LEAVE> phaser to be
executed, but it will run the code in the
L<C<&*EXIT>|/language/variables#index-entry-%24*EXIT> variable.
C<exit> should be used as last resort only to signal the parent process about an
exit code different from zero, and should not be used to terminate exceptionally
a method or a sub: use L<exceptions|/language/exceptions> instead.
C<exit> should be used as last resort only to signal the parent process
about an exit code different from zero, and not to terminate
exceptionally a method or a sub: use L<exceptions|/language/exceptions>
instead.
It is worth noting that the only way to return an exit code different from zero
from a L<Main|/routine/MAIN> function is by means of using C<exit>.
=head2 X<done>
Expand Down
2 changes: 1 addition & 1 deletion doc/Language/variables.pod6
Expand Up @@ -1279,7 +1279,7 @@ X<|$*PROGRAM>
=item C<$*PROGRAM>
location (in the form of an C<IO::Path> object) of the Perl program being executed;
X<|$*EXIT>
X<|&*EXIT>
=item C<&*EXIT> code that will be executed when doing an exit(). Intended to
be used in situations where Perl 6 is embedded in another language runtime
(such as Inline::Perl6 in Perl 5);
Expand Down

0 comments on commit 5811e64

Please sign in to comment.