summaryrefslogtreecommitdiff
path: root/lib/DB.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-10-09 16:42:26 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-10-09 16:42:26 +0000
commit1e006cbbb32821bc96c7ccdfb00fd9144a7ff852 (patch)
tree26444393197dcb4e79baef48a53fbc1652d15fa6 /lib/DB.pm
parentce87d91c2356e5fb8cc780255277325e7efd97f1 (diff)
downloadperl-1e006cbbb32821bc96c7ccdfb00fd9144a7ff852.tar.gz
Don't use a regexp in DB::sub().
This should work around perlbug #37102. p4raw-id: //depot/perl@25721
Diffstat (limited to 'lib/DB.pm')
-rw-r--r--lib/DB.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/DB.pm b/lib/DB.pm
index 342f5d82ec..4bc60c4061 100644
--- a/lib/DB.pm
+++ b/lib/DB.pm
@@ -63,8 +63,7 @@ sub sub {
push(@stack, $DB::single);
$DB::single &= 1;
$DB::single |= 4 if $#stack == $deep;
-# print $DB::sub, "\n";
- if ($DB::sub =~ /(?:^|::)DESTROY$/ or not defined wantarray) {
+ if ($DB::sub eq 'DESTROY' or substr($DB::sub, -9) eq '::DESTROY' or not defined wantarray) {
&$DB::sub;
$DB::single |= pop(@stack);
$DB::ret = undef;