This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Extract _handle_cmd_wrapper_commands.
authorShlomi Fish <shlomif@shlomifish.org>
Sat, 13 Oct 2012 18:25:28 +0000 (20:25 +0200)
committerRicardo Signes <rjbs@cpan.org>
Mon, 12 Nov 2012 14:18:40 +0000 (09:18 -0500)
lib/perl5db.pl

index 0a0b440..9042ab0 100644 (file)
@@ -2824,10 +2824,7 @@ deal with them instead of processing them in-line.
 
                 # All of these commands were remapped in perl 5.8.0;
                 # we send them off to the secondary dispatcher (see below).
-                if (my ($cmd_letter, $my_arg) = $cmd =~ /\A([aAbBeEhilLMoOPvwW]\b|[<>\{]{1,2})\s*(.*)/so) {
-                    cmd_wrapper( $cmd_letter, $my_arg, $line );
-                    next CMD;
-                }
+                $obj->_handle_cmd_wrapper_commands;
 
 =head4 C<y> - List lexicals in higher scope
 
@@ -3945,6 +3942,18 @@ sub _handle_q_command {
     return;
 }
 
+sub _handle_cmd_wrapper_commands {
+    my $self = shift;
+
+    # All of these commands were remapped in perl 5.8.0;
+    # we send them off to the secondary dispatcher (see below).
+    if (my ($cmd_letter, $my_arg) = $DB::cmd =~ /\A([aAbBeEhilLMoOPvwW]\b|[<>\{]{1,2})\s*(.*)/so) {
+        DB::cmd_wrapper( $cmd_letter, $my_arg, $line );
+        next CMD;
+    }
+
+    return;
+}
 package DB;
 
 # The following code may be executed now: