From: Rafael Garcia-Suarez Date: Sat, 28 Jun 2003 16:01:08 +0000 (+0000) Subject: Some clarification about the current semantics of CHECK and X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ca62f0fc957407f48588d44995309a50a80e45ab;p=p5sagit%2Fp5-mst-13.2.git Some clarification about the current semantics of CHECK and INIT blocks. See bug [perl #22826]. p4raw-id: //depot/perl@19872 --- diff --git a/pod/perlmod.pod b/pod/perlmod.pod index 6cbdce3..c03862d 100644 --- a/pod/perlmod.pod +++ b/pod/perlmod.pod @@ -283,15 +283,17 @@ going to pass to C. 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). -Similar to C blocks, C 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 make use of -C blocks to initialize and resolve pointers to XSUBs. - -Similar to C blocks, C blocks are run just after the -Perl compile phase ends and before the run time begins, in -LIFO order. C blocks are again useful in the Perl compiler -suite to save the compiled state of the program. +C and C blocks are useful to catch the transition between +the compilation phase and the execution phase of the main program. + +C blocks are run just after the Perl compile phase ends and before +the run time begins, in LIFO order. C blocks are used in +the Perl compiler suite to save the compiled state of the program. + +C 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 make use of C blocks to initialize and +resolve pointers to XSUBs. When you use the B<-n> and B<-p> switches to Perl, C and C work just as they do in B, as a degenerate case.