Extract _handle_T_command.
authorShlomi Fish <shlomif@shlomifish.org>
Fri, 5 Oct 2012 05:43:31 +0000 (07:43 +0200)
committerRicardo Signes <rjbs@cpan.org>
Mon, 12 Nov 2012 14:18:35 +0000 (09:18 -0500)
lib/perl5db.pl

index dcec7bf..6c2685e 100644 (file)
@@ -2559,10 +2559,7 @@ Just calls C<DB::print_trace>.
 
 =cut
 
-                if ($cmd eq 'T') {
-                    print_trace( $OUT, 1 );    # skip DB
-                    next CMD;
-                }
+                $obj->_handle_T_command;
 
 =head4 C<w> - List window around current line.
 
@@ -3741,6 +3738,15 @@ sub _handle_r_command {
     return;
 }
 
+sub _handle_T_command {
+    if ($DB::cmd eq 'T') {
+        DB::print_trace( $OUT, 1 );    # skip DB
+        next CMD;
+    }
+
+    return;
+}
+
 package DB;
 
 # The following code may be executed now: