« blib/lib/Devel/Trepan/CmdProcessor/Command/Set_Subcmd/Substitute.pm
↑ Summary
blib/lib/Devel/Trepan/CmdProcessor/Command/Show_Subcmd/Abbrev.pm »
| 1 | # -*- coding: utf-8 -*- | ||
| 2 | # Copyright (C) 2011, 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::Trace; | ||
| 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('tr'); | ||
| 14 | =pod | ||
| 15 | |||
| 16 | =head2 Synopsis: | ||
| 17 | |||
| 18 | =cut | ||
| 19 | our $HELP = <<"HELP"; | ||
| 20 | =pod | ||
| 21 | |||
| 22 | B<set trace> [I<set trace subcommands>] | ||
| 23 | |||
| 24 | Set tracing of various sorts. | ||
| 25 | |||
| 26 | The types of tracing include events from the trace buffer, or printing | ||
| 27 | those events. | ||
| 28 | |||
| 29 | Run C<help set trace *> for a list of subcommands or C<help set trace> | ||
| 30 | I<name> for help on a particular trace subcommand. | ||
| 31 | |||
| 32 | =head2 See also: | ||
| 33 | |||
| 34 | L<C<show trace>|Devel::Trepan::CmdProcessor::Command::Show::Trace> | ||
| 35 | |||
| 36 | =cut | ||
| 37 | HELP | ||
| 38 | our $SHORT_HELP = "Set tracing of various sorts."; | ||
| 39 | |||
| 40 | @ISA = qw(Devel::Trepan::CmdProcessor::Command::SubsubcmdMgr); | ||
| 41 | |||
| 42 | unless (caller) { | ||
| 43 | # Demo it. | ||
| 44 | # FIXME: DRY with other subcommand manager demo code. | ||
| 45 | require Devel::Trepan::CmdProcessor::Mock; | ||
| 46 | my ($proc, $cmd) = | ||
| 47 | Devel::Trepan::CmdProcessor::Mock::subcmd_setup(); | ||
| 48 | Devel::Trepan::CmdProcessor::Mock::subcmd_demo_info($proc, $cmd); | ||
| 49 | $cmd->run($cmd->{prefix}); | ||
| 50 | my @args = (@{$cmd->{prefix}}, 'print', 'off'); | ||
| 51 | $cmd->run(\@args); | ||
| 52 | } | ||
| 53 | |||
| 54 | 1; |