Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add link to enum type. Put the signal number -> Signal section on its…
… own paragraph to keep it from getting lost in the preceding text
  • Loading branch information
samcv committed Nov 14, 2016
1 parent 8ca1c63 commit 49fc78b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions doc/Type/Supply.pod6
Expand Up @@ -599,12 +599,16 @@ the supply. For example:
signal(SIGINT).tap( { say "Thank you for your attention"; exit 0 } );
would catch Control-C, thank you, and then exit. The list of supported
signals can be found by checking Signal::.keys (as you would any enum).
To go from a signal number to Signal, you can do something like this:
would catch Control-C, thank you, and then exit.
To go from a signal number to a Signal, you can do something like this:
signal(Signal(2)).tap( -> $sig { say "Received signal: $sig" } );
The list of supported signals can be found by checking Signal::.keys (as
you would any enum). For more details on how enums work see
L<enum|/language/typesystem#enum>.
=head2 method IO::Notification.watch-path
=for code :skip-test
Expand Down

0 comments on commit 49fc78b

Please sign in to comment.