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

filter: Statementstmt 0.0% 0 / 32 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 43 CC 1 SCAR 6.9
CC
1
Cov
0%
complete
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
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  
6 package Devel::Trepan::CmdProcessor::Command::Set::Different;
7  
8 use Devel::Trepan::CmdProcessor::Command::Subcmd::Core;
9  
10 @ISA = qw(Devel::Trepan::CmdProcessor::Command::SetBoolSubcmd);
11 # Values inherited from parent
12 use vars @Devel::Trepan::CmdProcessor::Command::Subcmd::SUBCMD_VARS;
13  
14 =pod
15  
16 =head2 Synopsis:
17  
18 =cut
19 our $HELP = <<'HELP';
20 =pod
21  
22 B<set different> [B<on>|B<off>|B<nostack>]
23  
24 Set to make sure C<next> or C<step> moves to a new position. If "on",
25 "off", or "nostack" is not given, "on" is assumed.
26  
27 A line can contain many possible stopping points. Inside a debugger,
28 it is sometimes desirable to continue but stop only when the position
29 next changes.
30  
31 Setting C<different> to on will cause each C<step> or C<next> command to
32 stop at a different position.
33  
34 Note though that the notion of different does take into account stack
35 nesting.
36  
37 =head2 See also:
38  
39 L<C<step>|Devel::Trepan::CmdProcessor::Command::step>, and
40 L<C<next>|Devel::Trepan::CmdProcessor::Command::Next> which have
41 suffixes C<+> and C<->; the suffixes override this setting.
42  
43 =cut
44 HELP
45  
46 sub complete($$)
47 {
48 my ($self, $prefix) = @_;
49 Devel::Trepan::Complete::complete_token(['on', 'off', 'nostack'],
50 $prefix);
51 }
52  
53  
54 our $MIN_ABBREV = length('dif');
55 our $SHORT_HELP = "Set to make sure 'next/step' move to a new position.";
56  
57 unless (caller) {
58 # Demo it.
59 require Devel::Trepan::CmdProcessor::Mock;
60 my ($proc, $cmd) =
61 Devel::Trepan::CmdProcessor::Mock::subcmd_setup();
62 Devel::Trepan::CmdProcessor::Mock::subcmd_demo_bool($proc, $cmd);
63 }
64  
65 1;