diff options
author | Shlomi Fish <shlomif@shlomifish.org> | 2012-10-11 14:22:47 +0200 |
---|---|---|
committer | Ricardo Signes <rjbs@cpan.org> | 2012-11-12 09:18:39 -0500 |
commit | 321095c591883c32fe7b61eb56314412e2fc7e6d (patch) | |
tree | 3b7d4c45039e91f8110fc2cc89f62fc16821b3ac /lib | |
parent | b8d11fe0290ee3c7f202bdcd2ab36dbf9c2036d3 (diff) | |
download | perl-321095c591883c32fe7b61eb56314412e2fc7e6d.tar.gz |
Extract _DB__handle_m_command.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/perl5db.pl | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 4fff513b0b..b97f52088f 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -2335,6 +2335,21 @@ sub _DB__handle_run_command_in_pager_command { return; } +sub _DB__handle_m_command { + my ($obj) = @_; + + if ($cmd =~ s#\Am\s+([\w:]+)\s*\z# #) { + methods($1); + next CMD; + } + + # m expr - set up DB::eval to do the work + if ($cmd =~ s#\Am\b# #) { # Rest gets done by DB::eval() + $onetimeDump = 'methods'; # method output gets used there + } + + return; +} sub DB { @@ -2705,15 +2720,7 @@ Just uses C<DB::methods> to determine what methods are available. =cut - if ($cmd =~ s#\Am\s+([\w:]+)\s*\z# #) { - methods($1); - next CMD; - } - - # m expr - set up DB::eval to do the work - if ($cmd =~ s#\Am\b# #) { # Rest gets done by DB::eval() - $onetimeDump = 'methods'; # method output gets used there - } + _DB__handle_m_command($obj); =head4 C<f> - switch files @@ -3905,6 +3912,7 @@ sub _handle_sh_command { sub _handle_x_command { my $self = shift; + if ($DB::cmd =~ s#\Ax\b# #) { # Remainder gets done by DB::eval() $onetimeDump = 'dump'; # main::dumpvar shows the output |