summaryrefslogtreecommitdiff
path: root/ext/re/re.pm
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-07-15 07:35:29 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-07-15 07:35:29 +0000
commit0a92e3a8032b83483524fad83a5e76cf0cf6aa8d (patch)
tree3e62bc74e77ff24ded126c2a72b4512f7f420b94 /ext/re/re.pm
parentf24bbd7dc19eb52f312855f9ca40f06202951a58 (diff)
downloadperl-0a92e3a8032b83483524fad83a5e76cf0cf6aa8d.tar.gz
minor tweaks to docs on qr//
p4raw-id: //depot/perl@1513
Diffstat (limited to 'ext/re/re.pm')
-rw-r--r--ext/re/re.pm17
1 files changed, 9 insertions, 8 deletions
diff --git a/ext/re/re.pm b/ext/re/re.pm
index 5ec012dee6..8b49ca14f4 100644
--- a/ext/re/re.pm
+++ b/ext/re/re.pm
@@ -23,9 +23,9 @@ re - Perl pragma to alter regular expression behaviour
/foo${pat}bar/; # disallowed (with or without -T switch)
}
- use re 'debug';
- /^(.*)$/s; # output debugging info
- # during compile and run time
+ use re 'debug'; # NOT lexically scoped (as others are)
+ /^(.*)$/s; # output debugging info during
+ # compile and run time
(We use $^X in these examples because it's tainted by default.)
@@ -44,12 +44,13 @@ potential security risk. Note that this pragma is ignored when the regular
expression is obtained from tainted data, i.e. evaluation is always
disallowed with tainted regular expresssions. See L<perlre/(?{ code })>.
-For the purpose of this pragma, interpolation of preexisting regular
-expressions is I<not> considered a variable interpolation, thus
+For the purpose of this pragma, interpolation of precompiled regular
+expressions (i.e., the result of C<qr//>) is I<not> considered variable
+interpolation. Thus:
/foo${pat}bar/
-I<is> allowed if $pat is a preexisting regular expressions, even
+I<is> allowed if $pat is a precompiled regular expression, even
if $pat contains C<(?{ ... })> assertions.
When C<use re 'debug'> is in effect, perl emits debugging messages when
@@ -59,8 +60,8 @@ B<-Dr> switch. It may be quite voluminous depending on the complexity
of the match.
See L<perldebug/"Debugging regular expressions"> for additional info.
-I<The directive C<use re 'debug'> is not lexically scoped.> It has
-both compile-time and run-time effects.
+The directive C<use re 'debug'> is I<not lexically scoped>, as the
+other directives are. It has both compile-time and run-time effects.
See L<perlmodlib/Pragmatic Modules>.