summaryrefslogtreecommitdiff
path: root/pod/perlop.pod
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2012-06-13 17:29:27 +0100
committerDavid Mitchell <davem@iabyn.com>2012-06-14 09:02:01 +0100
commite128ab2c0803fa45e7f26de2941696d173a9a293 (patch)
tree90ea68d121f7a4a49e0421667b1b2118386db114 /pod/perlop.pod
parente07bb5160f6400c20751be8384bb3458270effde (diff)
downloadperl-e128ab2c0803fa45e7f26de2941696d173a9a293.tar.gz
update docs for (?{}) jumbo fix
Update the docs and add perldelta entries summarising the changes and fixes related to (?{}) and (??{}) accumulated over the 120 or so commits in this branch.
Diffstat (limited to 'pod/perlop.pod')
-rw-r--r--pod/perlop.pod12
1 files changed, 9 insertions, 3 deletions
diff --git a/pod/perlop.pod b/pod/perlop.pod
index a53f869cd3..ced33b081c 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -2689,6 +2689,10 @@ As C<\c> is skipped at this step, C<@> of C<\c@> in RE is possibly
treated as an array symbol (for example C<@foo>),
even though the same text in C<qq//> gives interpolation of C<\c@>.
+Code blocks such as C<(?{BLOCK})> are handled by temporarily passing control
+back to the perl parser, in a similar way that an interpolated array
+subscript expression such as C<"foo$array[1+f("[xyz")]bar"> would be.
+
Moreover, inside C<(?{BLOCK})>, C<(?# comment )>, and
a C<#>-comment in a C<//x>-regular expression, no processing is
performed whatsoever. This is the first step at which the presence
@@ -2757,9 +2761,11 @@ rather different than the rule used for the rest of the pattern.
The terminator of this construct is found using the same rules as
for finding the terminator of a C<{}>-delimited construct, the only
exception being that C<]> immediately following C<[> is treated as
-though preceded by a backslash. Similarly, the terminator of
-C<(?{...})> is found using the same rules as for finding the
-terminator of a C<{}>-delimited construct.
+though preceded by a backslash.
+
+The terminator of runtime C<(?{...})> is found by temporarily switching
+control to the perl parser, which should stop at the point where the
+logically balancing terminating C<}> is found.
It is possible to inspect both the string given to RE engine and the
resulting finite automaton. See the arguments C<debug>/C<debugcolor>