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

filter: Statementstmt 0.0% 0 / 44 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 10 Podpod n/a totaltotal 0.0% 0 / 58 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) 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::Display;
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('di');
14 our $SHORT_HELP = 'Set display attributes';
15 =pod
16  
17 =head2 Synopsis:
18  
19 =cut
20  
21 our $HELP = <<'HELP';
22 =pod
23  
24 B<set display> [I<set display subcommands>]
25  
26 Set display attributes.
27  
28 Run C<set display *> for a list of subcommands or C<help set display>
29 I<name> for help on a particular display option.
30  
31 =head2 See also:
32  
33 L<C<show display>|Devel::Trepan::CmdProcessor::Command::Show::Display>,
34 L<C<set debug
35 eval>|Devel::Trepan::CmdProcessor::Command::Set::Debug::Eval>, and
36 L<C<set debug
37 op>|Devel::Trepan::CmdProcessor::Command::Set::Debug::OP>
38  
39 =cut
40 HELP
41  
42 @ISA = qw(Devel::Trepan::CmdProcessor::Command::SubsubcmdMgr);
43  
44 unless (caller) {
45 # Demo it.
46 # FIXME: DRY with other subcommand manager demo code.
47 require Devel::Trepan::CmdProcessor::Mock;
48 my ($proc, $cmd) =
49 Devel::Trepan::CmdProcessor::Mock::subcmd_setup();
50 Devel::Trepan::CmdProcessor::Mock::subcmd_demo_info($proc, $cmd);
51 for my $arg ('ev', 'op', 'foo') {
52 my @aref = $cmd->complete_token_with_next($arg);
53 printf "%s\n", @aref ? $aref[0]->[0]: 'undef';
54 }
55 $cmd->run($cmd->{prefix});
56 my @args = (@{$cmd->{prefix}}, 'op', 'on');
57 $cmd->run(\@args);
58 }
59  
60 1;