blib/lib/Devel/Trepan/CmdProcessor/Command/Set_Subcmd/Auto.pm untested

filter: Statementstmt 0.0% 0 / 43 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 10 Podpod n/a totaltotal 0.0% 0 / 57 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2011-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::Auto;
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('au');
14 =pod
15  
16 =head2 Synopsis:
17  
18 =cut
19  
20 our $HELP = <<'HELP';
21 =pod
22  
23 B<set auto> [I<set auto subcommand>]
24  
25 Set controls for things with some sort of automatic default behavior.
26  
27 Run C<help set auto *> for a list of subcommands or C<help set auto> I<name>
28 for help on a particular trace subcommand.
29  
30 =head2 See also:
31  
32 L<C<show auto>|Devel::Trepan::CmdProcessor::Command::Show::Auto>
33  
34 =cut
35 HELP
36  
37 our $SHORT_HELP =
38 "Set controls for some \"automatic\" default behaviors";
39  
40 @ISA = qw(Devel::Trepan::CmdProcessor::Command::SubsubcmdMgr);
41  
42  
43 # sub run($$)
44 # {
45 # my ($self, $args) = @_;
46 # $self->SUPER;
47 # }
48  
49 unless (caller) {
50 # Demo it.
51 # FIXME: DRY with other subcommand manager demo code.
52 require Devel::Trepan::CmdProcessor::Mock;
53 my ($proc, $cmd) =
54 Devel::Trepan::CmdProcessor::Mock::subcmd_setup();
55 Devel::Trepan::CmdProcessor::Mock::subcmd_demo_info($proc, $cmd);
56 for my $arg ('e', 'lis', 'foo') {
57 my @aref = $cmd->complete_token_with_next($arg);
58 printf "%s\n", @aref ? $aref[0]->[0]: 'undef';
59 }
60  
61 print join(' ', @{$cmd->{prefix}}), "\n";
62 $cmd->run($cmd->{prefix});
63  
64 }
65  
66 1;