Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
define INIT/END order across modules
  • Loading branch information
TimToady committed May 15, 2013
1 parent 1e7aec4 commit 14e9ce6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions S04-control.pod
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 14e9ce6

Please sign in to comment.