summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/ext/re/t/lexical_debug.pl
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2008-09-29 17:17:50 +0000
committermillert <millert@openbsd.org>2008-09-29 17:17:50 +0000
commit850e275390052b330d93020bf619a739a3c277ac (patch)
treedb372d287586cf504a5ead4801f6c6cf7eb31449 /gnu/usr.bin/perl/ext/re/t/lexical_debug.pl
parentmore updates on which args do and do not mix (doc only, this time): (diff)
downloadwireguard-openbsd-850e275390052b330d93020bf619a739a3c277ac.tar.xz
wireguard-openbsd-850e275390052b330d93020bf619a739a3c277ac.zip
import perl 5.10.0 from CPAN
Diffstat (limited to 'gnu/usr.bin/perl/ext/re/t/lexical_debug.pl')
-rw-r--r--gnu/usr.bin/perl/ext/re/t/lexical_debug.pl29
1 files changed, 29 insertions, 0 deletions
diff --git a/gnu/usr.bin/perl/ext/re/t/lexical_debug.pl b/gnu/usr.bin/perl/ext/re/t/lexical_debug.pl
new file mode 100644
index 00000000000..3ec7455ba1a
--- /dev/null
+++ b/gnu/usr.bin/perl/ext/re/t/lexical_debug.pl
@@ -0,0 +1,29 @@
+use re 'debug';
+
+$_ = 'foo bar baz bop fip fop';
+
+/foo/ and $count++;
+
+{
+ no re 'debug';
+ /bar/ and $count++;
+ {
+ use re 'debug';
+ /baz/ and $count++;
+ }
+ /bop/ and $count++;
+}
+
+/fip/ and $count++;
+
+no re 'debug';
+
+/fop/ and $count++;
+
+use re 'debug';
+my $var='zoo|liz|zap';
+/($var)/ or $count++;
+
+print "Count=$count\n";
+
+