perl.git
6 years ago_handle_cmd_wrapper_commands to %cmd_lookup.
Shlomi Fish [Sun, 14 Oct 2012 14:32:47 +0000 (16:32 +0200)] 
_handle_cmd_wrapper_commands to %cmd_lookup.

This is part of the ongoing perl5db.pl refactoring.

6 years agoRemove extraneous =cut-s from the POD.
Shlomi Fish [Sun, 14 Oct 2012 11:36:47 +0000 (13:36 +0200)] 
Remove extraneous =cut-s from the POD.

6 years agoLow hanging fruit is now in %cmd_lookup.
Shlomi Fish [Sun, 14 Oct 2012 11:22:45 +0000 (13:22 +0200)] 
Low hanging fruit is now in %cmd_lookup.

6 years agoMove more commands to the dispatch.
Shlomi Fish [Sun, 14 Oct 2012 11:09:05 +0000 (13:09 +0200)] 
Move more commands to the dispatch.

6 years agoAdd more commands to the lookup table.
Shlomi Fish [Sun, 14 Oct 2012 10:56:53 +0000 (12:56 +0200)] 
Add more commands to the lookup table.

6 years agoStart converting to %cmd_lookup.
Shlomi Fish [Sun, 14 Oct 2012 10:35:19 +0000 (12:35 +0200)] 
Start converting to %cmd_lookup.

This is a dispatch table for the commands based on their command
component.

6 years agoPass $obj to _DB__handle_f_command.
Shlomi Fish [Sun, 14 Oct 2012 10:04:31 +0000 (12:04 +0200)] 
Pass $obj to _DB__handle_f_command.

For consistency with the other commands.

6 years agoExtract _handle_cmd_wrapper_commands.
Shlomi Fish [Sat, 13 Oct 2012 18:25:28 +0000 (20:25 +0200)] 
Extract _handle_cmd_wrapper_commands.

6 years agoExtract _handle_q_command .
Shlomi Fish [Sat, 13 Oct 2012 17:36:17 +0000 (19:36 +0200)] 
Extract _handle_q_command .

6 years agoExtract the CMD: continue() into a subroutine.
Shlomi Fish [Thu, 11 Oct 2012 13:33:57 +0000 (15:33 +0200)] 
Extract the CMD: continue() into a subroutine.

6 years agoExtract _DB__handle_m_command.
Shlomi Fish [Thu, 11 Oct 2012 12:22:47 +0000 (14:22 +0200)] 
Extract _DB__handle_m_command.

6 years agoExtract _handle_x_command.
Shlomi Fish [Thu, 11 Oct 2012 09:14:18 +0000 (11:14 +0200)] 
Extract _handle_x_command.

6 years agoConvert from ^ to \A.
Shlomi Fish [Thu, 11 Oct 2012 08:29:36 +0000 (10:29 +0200)] 
Convert from ^ to \A.

This is part of the debugger refactoring.

6 years agoFix indentation.
Shlomi Fish [Wed, 10 Oct 2012 19:37:57 +0000 (21:37 +0200)] 
Fix indentation.

6 years agoperl5db: &cmd_wrapper -> cmd_wrapper().
Shlomi Fish [Wed, 10 Oct 2012 19:26:21 +0000 (21:26 +0200)] 
perl5db: &cmd_wrapper -> cmd_wrapper().

Leading ampersand is not needed.

6 years agoCorrect a bug with #g in list context.
Shlomi Fish [Wed, 10 Oct 2012 18:51:51 +0000 (20:51 +0200)] 
Correct a bug with #g in list context.

It does not work properly there - one should use $1 / etc.

6 years agoperl5db: extract more into _handle_sh_command.
Shlomi Fish [Wed, 10 Oct 2012 18:13:46 +0000 (20:13 +0200)] 
perl5db: extract more into _handle_sh_command.

6 years agoavoid overriding prototypes when the call can be fixed
Ricardo Signes [Wed, 10 Oct 2012 01:57:14 +0000 (21:57 -0400)] 
avoid overriding prototypes when the call can be fixed

We don't need to call share with an ampersand.  We can just call it in
the way its prototype implies.  While we're at it, we can fix the
prototype that we use when threads::shared can't be loaded.  Also,
there's no need to fake up lock, because it's already a do-nothing weak
keyword without threads.

6 years agocorrect the documented value of ${"_<$fn"}
Ricardo Signes [Tue, 9 Oct 2012 14:47:24 +0000 (10:47 -0400)] 
correct the documented value of ${"_<$fn"}

6 years agofix two small typos in MANIFEST updates
Ricardo Signes [Tue, 9 Oct 2012 14:47:10 +0000 (10:47 -0400)] 
fix two small typos in MANIFEST updates

6 years agoAdd ampersand to share.
Shlomi Fish [Tue, 9 Oct 2012 18:58:45 +0000 (20:58 +0200)] 
Add ampersand to share.

We need it to override the prototype and pass a variable by reference.

Thanks to RJBS who reported that. That fixed the tests with -Dusethreads
(thanks to Leon Timmermans).

6 years agoperl5db: extract _handle_sh_sh_command().
Shlomi Fish [Tue, 9 Oct 2012 16:50:42 +0000 (18:50 +0200)] 
perl5db: extract _handle_sh_sh_command().

6 years agoGet rid of a leading ampersand.
Shlomi Fish [Mon, 8 Oct 2012 17:59:00 +0000 (19:59 +0200)] 
Get rid of a leading ampersand.

6 years agoRefactoring - merged the two n/s cases.
Shlomi Fish [Mon, 8 Oct 2012 17:40:48 +0000 (19:40 +0200)] 
Refactoring - merged the two n/s cases.

6 years agoExtract a common method.
Shlomi Fish [Mon, 8 Oct 2012 13:32:24 +0000 (15:32 +0200)] 
Extract a common method.

6 years agoExtract _handle_[sn]_and_arg_commands.
Shlomi Fish [Mon, 8 Oct 2012 13:15:07 +0000 (15:15 +0200)] 
Extract _handle_[sn]_and_arg_commands.

6 years ago[perl5db] Remove unnecessary code.
Shlomi Fish [Sun, 7 Oct 2012 22:12:13 +0000 (00:12 +0200)] 
[perl5db] Remove unnecessary code.

We already handled the "t" command. This was detected during
refactoring.

6 years agoExtract _DB__handle_run_command_in_pager_command.
Shlomi Fish [Sun, 7 Oct 2012 13:26:57 +0000 (15:26 +0200)] 
Extract _DB__handle_run_command_in_pager_command.

6 years agoExtract _DB__handle_restart_and_rerun_commands().
Shlomi Fish [Sun, 7 Oct 2012 10:51:20 +0000 (12:51 +0200)] 
Extract _DB__handle_restart_and_rerun_commands().

6 years agoExtract _handle_save_command.
Shlomi Fish [Sun, 7 Oct 2012 10:41:36 +0000 (12:41 +0200)] 
Extract _handle_save_command.

6 years agoExtract _handle_enable_disable_commands .
Shlomi Fish [Sun, 7 Oct 2012 10:33:12 +0000 (12:33 +0200)] 
Extract _handle_enable_disable_commands .

6 years agoExtract _handle_source_command.
Shlomi Fish [Sun, 7 Oct 2012 10:11:45 +0000 (12:11 +0200)] 
Extract _handle_source_command.

6 years ago[perl5db] Extract _handle_equal_sign_command .
Shlomi Fish [Sun, 7 Oct 2012 10:01:21 +0000 (12:01 +0200)] 
[perl5db] Extract _handle_equal_sign_command .

6 years agoExtract _handle_p_command.
Shlomi Fish [Sat, 6 Oct 2012 14:47:39 +0000 (16:47 +0200)] 
Extract _handle_p_command.

6 years agoExtract _handle_doc_command.
Shlomi Fish [Sat, 6 Oct 2012 14:23:35 +0000 (16:23 +0200)] 
Extract _handle_doc_command.

6 years ago[perl5db] Extract _handle_H_command.
Shlomi Fish [Sat, 6 Oct 2012 12:33:41 +0000 (14:33 +0200)] 
[perl5db] Extract _handle_H_command.

6 years ago[perldb] Extract _handle_rc_search_history_command.
Shlomi Fish [Sat, 6 Oct 2012 11:33:34 +0000 (13:33 +0200)] 
[perldb] Extract _handle_rc_search_history_command.

6 years agoAdd quotes.
Shlomi Fish [Sat, 6 Oct 2012 11:19:27 +0000 (13:19 +0200)] 
Add quotes.

Without quotes the vim syntax was broken.

6 years ago[perl5db] Get rid of leading ampersands.
Shlomi Fish [Sat, 6 Oct 2012 11:04:39 +0000 (13:04 +0200)] 
[perl5db] Get rid of leading ampersands.

6 years ago[perl5db] Avoid some trailing expressions.
Shlomi Fish [Fri, 5 Oct 2012 14:48:46 +0000 (16:48 +0200)] 
[perl5db] Avoid some trailing expressions.

6 years ago[perl5db] Remove leading ampersands in sub call.
Shlomi Fish [Fri, 5 Oct 2012 14:28:25 +0000 (16:28 +0200)] 
[perl5db] Remove leading ampersands in sub call.

6 years agoAdd a reminder comment;
Shlomi Fish [Fri, 5 Oct 2012 11:07:11 +0000 (13:07 +0200)] 
Add a reminder comment;

6 years agoExtract _handle_rc_recall_command.
Shlomi Fish [Fri, 5 Oct 2012 10:59:48 +0000 (12:59 +0200)] 
Extract _handle_rc_recall_command.

6 years agoExtract _DB__handle_question_mark_command() .
Shlomi Fish [Fri, 5 Oct 2012 09:40:34 +0000 (11:40 +0200)] 
Extract _DB__handle_question_mark_command() .

6 years agoExtract _DB__handle_forward_slash_command().
Shlomi Fish [Fri, 5 Oct 2012 09:16:32 +0000 (11:16 +0200)] 
Extract _DB__handle_forward_slash_command().

Converted away from string eval in the process.

6 years agoExtract _handle_W_command .
Shlomi Fish [Fri, 5 Oct 2012 06:01:50 +0000 (08:01 +0200)] 
Extract _handle_W_command .

6 years agoExtract _handle_w_command.
Shlomi Fish [Fri, 5 Oct 2012 05:54:30 +0000 (07:54 +0200)] 
Extract _handle_w_command.

6 years agoExtract _handle_T_command.
Shlomi Fish [Fri, 5 Oct 2012 05:43:31 +0000 (07:43 +0200)] 
Extract _handle_T_command.

6 years ago[perl5db] Extract _handle_r_command.
Shlomi Fish [Thu, 4 Oct 2012 18:29:48 +0000 (20:29 +0200)] 
[perl5db] Extract _handle_r_command.

6 years ago[perl5db] Extract _handle_c_command.
Shlomi Fish [Thu, 4 Oct 2012 18:09:40 +0000 (20:09 +0200)] 
[perl5db] Extract _handle_c_command.

6 years agoExtract _handle_s_command and refactored.
Shlomi Fish [Thu, 4 Oct 2012 17:42:08 +0000 (19:42 +0200)] 
Extract _handle_s_command and refactored.

6 years ago[perl5db] Extract _handle_n_command.
Shlomi Fish [Thu, 4 Oct 2012 17:30:17 +0000 (19:30 +0200)] 
[perl5db] Extract _handle_n_command.

6 years agoExtract _DB__handle_y_command .
Shlomi Fish [Thu, 4 Oct 2012 17:16:28 +0000 (19:16 +0200)] 
Extract _DB__handle_y_command .

6 years ago[perl5db] Extract $obj->_handle_dash_command.
Shlomi Fish [Thu, 4 Oct 2012 17:03:57 +0000 (19:03 +0200)] 
[perl5db] Extract $obj->_handle_dash_command.

6 years ago[perl5db] Extract another function.
Shlomi Fish [Thu, 4 Oct 2012 16:41:13 +0000 (18:41 +0200)] 
[perl5db] Extract another function.

6 years agoExtract _DB__handle_f_command.
Shlomi Fish [Thu, 4 Oct 2012 14:38:45 +0000 (16:38 +0200)] 
Extract _DB__handle_f_command.

6 years agoExtract _handle_V_command_and_X_command.
Shlomi Fish [Wed, 3 Oct 2012 13:28:29 +0000 (15:28 +0200)] 
Extract _handle_V_command_and_X_command.

6 years agoExtract _handle_S_command.
Shlomi Fish [Wed, 3 Oct 2012 13:04:43 +0000 (15:04 +0200)] 
Extract _handle_S_command.

6 years agoFix "a [command]" statement.
Shlomi Fish [Wed, 3 Oct 2012 12:28:28 +0000 (14:28 +0200)] 
Fix "a [command]" statement.

Without a line number. See:

https://rt.perl.org/rt3/Ticket/Display.html?id=115110 .

6 years ago$slave_editor → our.
Shlomi Fish [Tue, 2 Oct 2012 17:37:19 +0000 (19:37 +0200)] 
$slave_editor → our.

6 years agoPlaced declarations on one line and sorted.
Shlomi Fish [Tue, 2 Oct 2012 17:09:40 +0000 (19:09 +0200)] 
Placed declarations on one line and sorted.

6 years agoMore variables to our.
Shlomi Fish [Tue, 2 Oct 2012 17:00:13 +0000 (19:00 +0200)] 
More variables to our.

6 years ago[perl5db] Convert more global vars to our.
Shlomi Fish [Tue, 2 Oct 2012 16:34:52 +0000 (18:34 +0200)] 
[perl5db] Convert more global vars to our.

6 years ago[perl5db] Convert variables to our.
Shlomi Fish [Tue, 2 Oct 2012 16:15:48 +0000 (18:15 +0200)] 
[perl5db] Convert variables to our.

This helps avoid calling them with $DB::var_name.

6 years agoRefactoring - convert $trace to our.
Shlomi Fish [Tue, 2 Oct 2012 16:05:21 +0000 (18:05 +0200)] 
Refactoring - convert $trace to our.

6 years ago[perl5db] Extract a method.
Shlomi Fish [Tue, 2 Oct 2012 15:59:07 +0000 (17:59 +0200)] 
[perl5db] Extract a method.

6 years ago[perl5db] Refactoring.
Shlomi Fish [Tue, 2 Oct 2012 15:47:27 +0000 (17:47 +0200)] 
[perl5db] Refactoring.

6 years agoperl5db: extract a function.
Shlomi Fish [Tue, 2 Oct 2012 15:13:21 +0000 (17:13 +0200)] 
perl5db: extract a function.

6 years ago[perl5db] Convert tabs to spaces.
Shlomi Fish [Tue, 2 Oct 2012 14:15:32 +0000 (16:15 +0200)] 
[perl5db] Convert tabs to spaces.

6 years agoperl5db: fix some indentation that was off.
Shlomi Fish [Tue, 2 Oct 2012 14:05:45 +0000 (16:05 +0200)] 
perl5db: fix some indentation that was off.

6 years ago[perl5db] Extract a function in the condition.
Shlomi Fish [Tue, 2 Oct 2012 13:57:13 +0000 (15:57 +0200)] 
[perl5db] Extract a function in the condition.

6 years agoConvert comma-separated expressions to do{}.
Shlomi Fish [Tue, 2 Oct 2012 13:48:57 +0000 (15:48 +0200)] 
Convert comma-separated expressions to do{}.

6 years agoperl5db: remove leading ampersand.
Shlomi Fish [Tue, 2 Oct 2012 13:31:53 +0000 (15:31 +0200)] 
perl5db: remove leading ampersand.

6 years ago[perl5db] extract a subroutine.
Shlomi Fish [Tue, 2 Oct 2012 13:22:02 +0000 (15:22 +0200)] 
[perl5db] extract a subroutine.

6 years ago[perl5db] Missed one.
Shlomi Fish [Tue, 2 Oct 2012 12:46:14 +0000 (14:46 +0200)] 
[perl5db] Missed one.

6 years agoperl5db: Avoid trailing ifs with 2 expressions.
Shlomi Fish [Tue, 2 Oct 2012 12:39:15 +0000 (14:39 +0200)] 
perl5db: Avoid trailing ifs with 2 expressions.

6 years ago[perl5db-refactor] Avoid trailing ifs.
Shlomi Fish [Tue, 2 Oct 2012 12:08:09 +0000 (14:08 +0200)] 
[perl5db-refactor] Avoid trailing ifs.

6 years agoperl5db: no longer passing arguments to DB::eval().
Shlomi Fish [Mon, 1 Oct 2012 18:40:13 +0000 (20:40 +0200)] 
perl5db: no longer passing arguments to DB::eval().

It didn't accept any arguments anyway.

6 years agoExtract a function.
Shlomi Fish [Mon, 1 Oct 2012 18:29:23 +0000 (20:29 +0200)] 
Extract a function.

6 years agoperl5db: refactored a regex match.
Shlomi Fish [Mon, 1 Oct 2012 18:14:21 +0000 (20:14 +0200)] 
perl5db: refactored a regex match.

This may improve performance a little.

6 years agoperl5db refactor: avoid ampersands, and trailing.
Shlomi Fish [Mon, 1 Oct 2012 15:48:23 +0000 (17:48 +0200)] 
perl5db refactor: avoid ampersands, and trailing.

6 years ago[perl5db] Extract some subroutines.
Shlomi Fish [Mon, 1 Oct 2012 15:29:05 +0000 (17:29 +0200)] 
[perl5db] Extract some subroutines.

6 years ago[perl5db] More refactoring.
Shlomi Fish [Mon, 1 Oct 2012 13:50:23 +0000 (15:50 +0200)] 
[perl5db] More refactoring.

6 years agoExtract a common closure.
Shlomi Fish [Mon, 1 Oct 2012 13:40:48 +0000 (15:40 +0200)] 
Extract a common closure.

6 years ago[perl5db] Refactoring.
Shlomi Fish [Mon, 1 Oct 2012 13:13:16 +0000 (15:13 +0200)] 
[perl5db] Refactoring.

Remove leading ampersands, convert to lexical captures and add
an explicit return.

6 years ago[perl5db] Refactoring.
Shlomi Fish [Mon, 1 Oct 2012 12:43:02 +0000 (14:43 +0200)] 
[perl5db] Refactoring.

6 years ago[perl5db] Refactored argument passing.
Shlomi Fish [Mon, 1 Oct 2012 11:57:51 +0000 (13:57 +0200)] 
[perl5db] Refactored argument passing.

6 years ago[perl5db] Add explicit empty returns.
Shlomi Fish [Mon, 1 Oct 2012 11:47:54 +0000 (13:47 +0200)] 
[perl5db] Add explicit empty returns.

See Perl Best Practices.

6 years ago[perl5db] Fix a bug - with a test.
Shlomi Fish [Mon, 1 Oct 2012 11:16:33 +0000 (13:16 +0200)] 
[perl5db] Fix a bug - with a test.

The problem was that the arguments in print_help were not extracted correctly.

6 years agoExtract $DB::dbline[$DB::line].
Shlomi Fish [Sun, 30 Sep 2012 21:31:34 +0000 (23:31 +0200)] 
Extract $DB::dbline[$DB::line].

6 years agoExtract append_to_position and append_to_prefix.
Shlomi Fish [Sun, 30 Sep 2012 21:21:24 +0000 (23:21 +0200)] 
Extract append_to_position and append_to_prefix.

6 years agoExtract method _my_print_lineinfo.
Shlomi Fish [Sun, 30 Sep 2012 20:39:05 +0000 (22:39 +0200)] 
Extract method _my_print_lineinfo.

6 years agoExtract DB::Obj - a class.
Shlomi Fish [Sun, 30 Sep 2012 20:26:47 +0000 (22:26 +0200)] 
Extract DB::Obj - a class.

Converted some of the functions to its methods.

However, one function could not be moved out of "package DB;" so it
was left as a function.

6 years agoExtract _DB__grab_control().
Shlomi Fish [Sun, 30 Sep 2012 17:33:07 +0000 (19:33 +0200)] 
Extract _DB__grab_control().

I'm a bit unhappy with the interface - I'm planning to extract a class
and an object to instantiate.

6 years agoExtract _DB__handle_watch_expressions() .
Shlomi Fish [Sun, 30 Sep 2012 17:11:02 +0000 (19:11 +0200)] 
Extract _DB__handle_watch_expressions() .

6 years agoExtract _DB__determine_if_we_should_break() .
Shlomi Fish [Sun, 30 Sep 2012 15:22:28 +0000 (17:22 +0200)] 
Extract _DB__determine_if_we_should_break() .

6 years ago[perl5db] More refactoring.
Shlomi Fish [Sun, 30 Sep 2012 15:15:18 +0000 (17:15 +0200)] 
[perl5db] More refactoring.

6 years agoExtract _restore_shared_globals_after_restart.
Shlomi Fish [Sun, 30 Sep 2012 14:27:39 +0000 (16:27 +0200)] 
Extract _restore_shared_globals_after_restart.

6 years agoExtract _restore_globals_after_restart.
Shlomi Fish [Sun, 30 Sep 2012 14:14:15 +0000 (16:14 +0200)] 
Extract _restore_globals_after_restart.

6 years ago[perl5db-refactor] Extract a function.
Shlomi Fish [Sun, 30 Sep 2012 13:56:49 +0000 (15:56 +0200)] 
[perl5db-refactor] Extract a function.

_restore_options_after_restart() .