diff options
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlmod.pod | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/pod/perlmod.pod b/pod/perlmod.pod index 6cbdce3f9b..c03862d64d 100644 --- a/pod/perlmod.pod +++ b/pod/perlmod.pod @@ -283,15 +283,17 @@ going to pass to C<exit()>. You can modify C<$?> to change the exit value of the program. Beware of changing C<$?> by accident (e.g. by running something via C<system>). -Similar to C<BEGIN> blocks, C<INIT> blocks are run just before the -Perl runtime begins execution, in "first in, first out" (FIFO) order. -For example, the code generators documented in L<perlcc> make use of -C<INIT> blocks to initialize and resolve pointers to XSUBs. - -Similar to C<END> blocks, C<CHECK> blocks are run just after the -Perl compile phase ends and before the run time begins, in -LIFO order. C<CHECK> blocks are again useful in the Perl compiler -suite to save the compiled state of the program. +C<CHECK> and C<INIT> blocks are useful to catch the transition between +the compilation phase and the execution phase of the main program. + +C<CHECK> blocks are run just after the Perl compile phase ends and before +the run time begins, in LIFO order. C<CHECK> blocks are used in +the Perl compiler suite to save the compiled state of the program. + +C<INIT> blocks are run just before the Perl runtime begins execution, in +"first in, first out" (FIFO) order. For example, the code generators +documented in L<perlcc> make use of C<INIT> blocks to initialize and +resolve pointers to XSUBs. When you use the B<-n> and B<-p> switches to Perl, C<BEGIN> and C<END> work just as they do in B<awk>, as a degenerate case. |