From: Rafael Garcia-Suarez Date: Sun, 9 Oct 2005 16:42:26 +0000 (+0000) Subject: Don't use a regexp in DB::sub(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1e006cbbb32821bc96c7ccdfb00fd9144a7ff852;p=p5sagit%2Fp5-mst-13.2.git Don't use a regexp in DB::sub(). This should work around perlbug #37102. p4raw-id: //depot/perl@25721 --- diff --git a/lib/DB.pm b/lib/DB.pm index 342f5d8..4bc60c4 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;