Browse files

define INIT/END order across modules

  • Loading branch information...
1 parent 1e7aec4 commit 14e9ce6c8a7cb5f9f7c69d7c18b8a405031c4b33 @TimToady TimToady committed May 15, 2013
Showing with 5 additions and 3 deletions.
  1. +5 −3 S04-control.pod
@@ -12,8 +12,8 @@ Synopsis 4: Blocks and Statements
Created: 19 Aug 2004
- Last Modified: 27 Feb 2013
- Version: 121
+ Last Modified: 15 May 2013
+ Version: 122
This document summarizes Apocalypse 4, which covers the block and
statement syntax of Perl.
@@ -1431,7 +1431,9 @@ actual trait (except for C<START>, which executes inline). So if you
examine the C<ENTER> trait of a block, you'll find that it's really
a list of phasers rather than a single phaser. In general, initializing
phasers execute in order declared, while finalizing phasers execute in
-the opposite order.
+the opposite order. When phasers are in different modules, the
+C<INIT> and C<END> phasers are treated as if declared at C<use> time in
+the using module.
The semantics of C<INIT> and C<START> are not equivalent to each
other in the case of cloned closures. An C<INIT> only runs once for

0 comments on commit 14e9ce6

Please sign in to comment.