summaryrefslogtreecommitdiff
path: root/lib/perl5db
diff options
context:
space:
mode:
authorBram <p5p@perl.wizbit.be>2009-07-25 16:26:45 +0200
committerCraig A. Berry <craigberry@mac.com>2009-07-25 13:58:15 -0500
commitb7bfa855cd96849c1ce8b7e9624b69c94149aacc (patch)
treef93fd96f6fdc8d2215ecbf3e8f5e3791205b651a /lib/perl5db
parent1375cf1cf2085f851bb176047d5e60248542f555 (diff)
downloadperl-b7bfa855cd96849c1ce8b7e9624b69c94149aacc.tar.gz
Do not use a regex in DB::sub
Diffstat (limited to 'lib/perl5db')
-rw-r--r--lib/perl5db/t/rt-6611036
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/perl5db/t/rt-66110 b/lib/perl5db/t/rt-66110
new file mode 100644
index 0000000000..7ba6c36d02
--- /dev/null
+++ b/lib/perl5db/t/rt-66110
@@ -0,0 +1,36 @@
+#!/usr/bin/perl
+#
+# This code is used by lib/perl5db.t !!!
+#
+
+$all_ok = 1;
+*c = sub { };
+
+if ("abcdefghi" =~ m/(abc)(def)(?{ c() })(ghi)/) {
+ print "ok 1\n";
+
+ $all_ok = 0, print "not " if $1 ne 'abc';
+ print "ok 2\n";
+
+ $all_ok = 0, print "not " if $2 ne 'def';
+ print "ok 3\n";
+
+ $all_ok = 0, print "not " if $3 ne 'ghi';
+ print "ok 4\n";
+
+ $all_ok = 0, print "not " if $& ne 'abcdefghi';
+ print "ok 5\n";
+}
+else {
+ $all_ok = 0;
+ print "not ok 1\n";
+ print "not ok 2\n";
+ print "not ok 3\n";
+ print "not ok 4\n";
+ print "not ok 5\n";
+}
+
+if ($all_ok) {
+ print "All tests successful.";
+}
+