summaryrefslogtreecommitdiff
path: root/pod/perlmod.pod
diff options
context:
space:
mode:
authorChas. J. Owens IV <chas.owens@gmail.com>2010-11-02 10:15:32 -0400
committerFlorian Ragwitz <rafl@debian.org>2010-11-14 17:18:05 +0100
commit9e923162438e0df7622d029d15fec76ef05799bd (patch)
treeede14d90d639c9a1da825dbb48e3c9920d90562f /pod/perlmod.pod
parent627364f14af689f968a4854d02bdcc59ee644657 (diff)
downloadperl-9e923162438e0df7622d029d15fec76ef05799bd.tar.gz
string do and require don't execute INIT and CHECK blocks
Signed-off-by: Florian Ragwitz <rafl@debian.org> [rafl@debian.org: Minor wording tweaks]
Diffstat (limited to 'pod/perlmod.pod')
-rw-r--r--pod/perlmod.pod8
1 files changed, 4 insertions, 4 deletions
diff --git a/pod/perlmod.pod b/pod/perlmod.pod
index eaa8ba91db..8679b53e88 100644
--- a/pod/perlmod.pod
+++ b/pod/perlmod.pod
@@ -311,10 +311,10 @@ 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.
-The C<CHECK> and C<INIT> 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<eval STRING> to load code at runtime.
+The C<CHECK> and C<INIT> blocks in code compiled by C<require>, string C<do>,
+or string C<eval> will not be executed if they occur after the end of the
+main compilation phase; that can be a problem in mod_perl and other persistent
+environments which use those functions to load code at runtime.
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.