develooper Front page | perl.perl5.porters | Postings from March 2013

[PATCH] adjust $DB::deep from 100 to 1000

Thread Next
From:
Mark Dominus
Date:
March 28, 2013 23:17
Subject:
[PATCH] adjust $DB::deep from 100 to 1000
Message ID:
1035.1364512651@plover.com

$DB::deep defaults to 100; this means that when the debugger gets 100
levels deep in subroutine calls, it automatically breaks execution.
While this might have been appropriate in 1989, in modern Perl
programs, the debugger might break before the program is even
compiled.

This patch adjusts the default value up to 1000.

I was not able to find the default value documented anywhere.

---
 lib/DB.pm      | 2 +-
 lib/perl5db.pl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/DB.pm b/lib/DB.pm
index 03f2b21..4783389 100644
--- a/lib/DB.pm
+++ b/lib/DB.pm
@@ -48,7 +48,7 @@ BEGIN {
   $running = 1;         # are we running, or are we stopped?
   @stack = (0);
   @clients = ();
-  $deep = 100;
+  $deep = 1000;
   $ready = 0;
   @saved = ();
   @skippkg = ();
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index 85a5ef4..68ba556 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -9157,7 +9157,7 @@ BEGIN {    # This does not compile, alas. (XXX eh?)
 
     # This defines the point at which you get the 'deep recursion'
     # warning. It MUST be defined or the debugger will not load.
-    $deep = 100;
+    $deep = 1000;
 
     # Number of lines around the current one that are shown in the
     # 'w' command.
-- 
1.8.2


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About