« blib/lib/Devel/Trepan/CmdProcessor/Command/Set_Subcmd/Confirm.pm
↑ Summary
blib/lib/Devel/Trepan/CmdProcessor/Command/Set_Subcmd/Debug_Subcmd/Except.pm »
| 1 | # -*- coding: utf-8 -*- | ||
| 2 | # Copyright (C) 2012, 2014-2015 Rocky Bernstein <rocky@cpan.org> | ||
| 3 | use warnings; no warnings 'redefine'; no warnings 'once'; | ||
| 4 | use rlib '../../../../..'; | ||
| 5 | use strict; | ||
| 6 | use vars qw(@ISA @SUBCMD_VARS); | ||
| 7 | |||
| 8 | package Devel::Trepan::CmdProcessor::Command::Set::Debug; | ||
| 9 | |||
| 10 | use Devel::Trepan::CmdProcessor::Command::Subcmd::Core; | ||
| 11 | use Devel::Trepan::CmdProcessor::Command::Subcmd::SubsubMgr; | ||
| 12 | use vars qw(@ISA @SUBCMD_VARS); | ||
| 13 | our $MIN_ABBREV = length('de'); | ||
| 14 | =pod | ||
| 15 | |||
| 16 | =head2 Synopsis: | ||
| 17 | |||
| 18 | =cut | ||
| 19 | |||
| 20 | our $HELP = <<"HELP"; | ||
| 21 | =pod | ||
| 22 | |||
| 23 | B<set debug> [I<set debug commands>] | ||
| 24 | |||
| 25 | Set debugger debugging controls. | ||
| 26 | |||
| 27 | Run C<set debug *> for a list of subcommands or C<help set debug> I<name> | ||
| 28 | for help on a particular debugging control. | ||
| 29 | |||
| 30 | =head2 See also: | ||
| 31 | |||
| 32 | L<C<show debug>|Devel::Trepan::CmdProcessor::Command::Show::Debug>, | ||
| 33 | L<C<set debug | ||
| 34 | except>|Devel::Trepan::CmdProcessor::Command::Set::Debug::Except>, | ||
| 35 | L<C<set debug | ||
| 36 | macro>|Devel::Trepan::CmdProcessor::Command::Set::Debug::Macro>, and | ||
| 37 | L<C<set debug | ||
| 38 | skip>|Devel::Trepan::CmdProcessor::Command::Set::Debug::Skip>. | ||
| 39 | |||
| 40 | =cut | ||
| 41 | HELP | ||
| 42 | our $SHORT_HELP = "Set debugging controls"; | ||
| 43 | |||
| 44 | @ISA = qw(Devel::Trepan::CmdProcessor::Command::SubsubcmdMgr); | ||
| 45 | |||
| 46 | |||
| 47 | # sub run($$) | ||
| 48 | # { | ||
| 49 | # my ($self, $args) = @_; | ||
| 50 | # $self->SUPER; | ||
| 51 | # } | ||
| 52 | |||
| 53 | unless (caller) { | ||
| 54 | # Demo it. | ||
| 55 | # FIXME: DRY with other subcommand manager demo code. | ||
| 56 | require Devel::Trepan::CmdProcessor::Mock; | ||
| 57 | my ($proc, $cmd) = | ||
| 58 | Devel::Trepan::CmdProcessor::Mock::subcmd_setup(); | ||
| 59 | Devel::Trepan::CmdProcessor::Mock::subcmd_demo_info($proc, $cmd); | ||
| 60 | for my $arg ('e', 'macro', 'foo') { | ||
| 61 | my @aref = $cmd->complete_token_with_next($arg); | ||
| 62 | printf "%s\n", @aref ? $aref[0]->[0]: 'undef'; | ||
| 63 | } | ||
| 64 | $cmd->run($cmd->{prefix}); | ||
| 65 | my @args = (@{$cmd->{prefix}}, 'except', 'on'); | ||
| 66 | $cmd->run(\@args); | ||
| 67 | } | ||
| 68 | |||
| 69 | 1; |