From: Rafael Garcia-Suarez Date: Fri, 24 Jul 2009 09:13:44 +0000 (+0200) Subject: Rephrase note about CHECK and INIT in eval("") in perlmod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=98107fc72616109aca5e0f235c7401288a09bd2f;p=p5sagit%2Fp5-mst-13.2.git Rephrase note about CHECK and INIT in eval("") in perlmod (based on suggestions by David Nicol and chromatic) --- diff --git a/pod/perlmod.pod b/pod/perlmod.pod index 3d5f3ad..4a7c62d 100644 --- a/pod/perlmod.pod +++ b/pod/perlmod.pod @@ -273,11 +273,6 @@ and such from other files in time to be visible to the rest of the compile and run time. Once a C has run, it is immediately undefined and any code it used is returned to Perl's memory pool. -It should be noted that C and C code blocks B -executed inside string C's. The C and C code -blocks are B executed inside a string eval, which e.g. can be a -problem in a mod_perl environment. - An C code block is executed as late as possible, that is, after perl has finished running the program and just before the interpreter is being exited, even if it is exiting as a result of a die() function. @@ -316,6 +311,11 @@ 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. +The C and C code blocks will not be executed inside a string +eval(), if that eval() happens after the end of the main compilation +phase; that can be a problem in mod_perl and other persistent environments +which use C to load code at runtime. + 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. Both C and C blocks are run when you use the B<-c>