summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorAbigail <abigail@abigail.be>2010-01-06 18:19:11 +0100
committerAbigail <abigail@abigail.be>2010-01-06 18:19:11 +0100
commit0b370c0a264633281d21c8cf13f698b896d74ce6 (patch)
tree7efe210f87821156d371833211f4c8a58fe16305 /pod
parent99cc5cc69e81e458dc4fa44238a666045699b2b8 (diff)
downloadperl-0b370c0a264633281d21c8cf13f698b896d74ce6.tar.gz
Document that interpolating a '(??{ code })' construct in a regular
expression also requires "use re 'eval'", just as '(?{ code })' does.
Diffstat (limited to 'pod')
-rw-r--r--pod/perlre.pod6
1 files changed, 6 insertions, 0 deletions
diff --git a/pod/perlre.pod b/pod/perlre.pod
index e040f09c34..c997a9ede0 100644
--- a/pod/perlre.pod
+++ b/pod/perlre.pod
@@ -1035,6 +1035,12 @@ The following pattern matches a parenthesized group:
See also C<(?PARNO)> for a different, more efficient way to accomplish
the same task.
+For reasons of security, this construct is forbidden if the regular
+expression involves run-time interpolation of variables, unless the
+perilous C<use re 'eval'> pragma has been used (see L<re>), or the
+variables contain results of C<qr//> operator (see
+L<perlop/"qr/STRING/imosx">).
+
Because perl's regex engine is not currently re-entrant, delayed
code may not invoke the regex engine either directly with C<m//> or C<s///>),
or indirectly with functions such as C<split>.