| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# -*- coding: utf-8 -*- |
|
2
|
|
|
|
|
|
|
# Copyright (C) 2011-2012, 2014 Rocky Bernstein <rocky@cpan.org> |
|
3
|
12
|
|
|
12
|
|
83
|
use warnings; no warnings 'redefine'; no warnings 'once'; |
|
|
12
|
|
|
12
|
|
30
|
|
|
|
12
|
|
|
12
|
|
493
|
|
|
|
12
|
|
|
|
|
73
|
|
|
|
12
|
|
|
|
|
32
|
|
|
|
12
|
|
|
|
|
448
|
|
|
|
12
|
|
|
|
|
69
|
|
|
|
12
|
|
|
|
|
32
|
|
|
|
12
|
|
|
|
|
326
|
|
|
4
|
12
|
|
|
12
|
|
68
|
use rlib '../../../../../..'; |
|
|
12
|
|
|
|
|
28
|
|
|
|
12
|
|
|
|
|
90
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Devel::Trepan::CmdProcessor::Command::Set::Max::List; |
|
7
|
12
|
|
|
12
|
|
5125
|
use Devel::Trepan::CmdProcessor::Command::Subcmd::Subsubcmd; |
|
|
12
|
|
|
|
|
34
|
|
|
|
12
|
|
|
|
|
289
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
12
|
|
|
12
|
|
65
|
use strict; |
|
|
12
|
|
|
|
|
33
|
|
|
|
12
|
|
|
|
|
296
|
|
|
10
|
12
|
|
|
12
|
|
72
|
use vars qw(@ISA @SUBCMD_VARS); |
|
|
12
|
|
|
|
|
32
|
|
|
|
12
|
|
|
|
|
811
|
|
|
11
|
|
|
|
|
|
|
@ISA = qw(Devel::Trepan::CmdProcessor::Command::Subsubcmd); |
|
12
|
|
|
|
|
|
|
# Values inherited from parent |
|
13
|
|
|
|
|
|
|
|
|
14
|
12
|
|
|
12
|
|
73
|
use vars @Devel::Trepan::CmdProcessor::Command::Subsubcmd::SUBCMD_VARS; |
|
|
12
|
|
|
|
|
38
|
|
|
|
12
|
|
|
|
|
2734
|
|
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $IN_LIST = 1; |
|
17
|
|
|
|
|
|
|
=pod |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head2 Synopsis: |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
our $HELP = <<'HELP'; |
|
24
|
|
|
|
|
|
|
=pod |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
B<set max list> I<count> |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Set number of source-code lines to list by default. |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head2 See also: |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
L<C<set max list>|Devel::Trepan::CmdProcessor::Set::Max::List> |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
|
35
|
|
|
|
|
|
|
HELP |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
our $MIN_ABBREV = length('lis'); |
|
38
|
|
|
|
|
|
|
our $SHORT_HELP = 'Set number of lines to list'; |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub run($$) |
|
41
|
|
|
|
|
|
|
{ |
|
42
|
0
|
|
|
0
|
|
|
my ($self, $args) = @_; |
|
43
|
0
|
|
|
|
|
|
my @args = @$args; |
|
44
|
0
|
|
|
|
|
|
shift @args; shift @args; shift @args; |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
my $num_str = join(' ', @args); |
|
46
|
0
|
|
|
|
|
|
$self->run_set_int($num_str, |
|
47
|
|
|
|
|
|
|
"The '$self->{cmd_str}' command requires a line width", |
|
48
|
|
|
|
|
|
|
0); |
|
49
|
|
|
|
|
|
|
} |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
unless (caller) { |
|
52
|
|
|
|
|
|
|
# Demo it. |
|
53
|
|
|
|
|
|
|
# require_relative '../../../mock' |
|
54
|
|
|
|
|
|
|
# name = File.basename(__FILE__, '.rb') |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# dbgr, set_cmd = MockDebugger::setup('set') |
|
57
|
|
|
|
|
|
|
# max_cmd = Trepan::SubSubcommand::SetMax.new(dbgr.core.processor, |
|
58
|
|
|
|
|
|
|
# set_cmd) |
|
59
|
|
|
|
|
|
|
# cmd_ary = Trepan::SubSubcommand::SetMaxList::PREFIX |
|
60
|
|
|
|
|
|
|
# cmd_name = cmd_ary.join(' ') |
|
61
|
|
|
|
|
|
|
# subcmd = Trepan::SubSubcommand::SetMaxList.new(set_cmd.proc, |
|
62
|
|
|
|
|
|
|
# max_cmd, |
|
63
|
|
|
|
|
|
|
# cmd_name) |
|
64
|
|
|
|
|
|
|
# prefix_run = cmd_ary[1..-1] |
|
65
|
|
|
|
|
|
|
# subcmd.run(prefix_run) |
|
66
|
|
|
|
|
|
|
# subcmd.run(prefix_run + %w(0)) |
|
67
|
|
|
|
|
|
|
# subcmd.run(prefix_run + %w(20)) |
|
68
|
|
|
|
|
|
|
# name = File.basename(__FILE__, '.rb') |
|
69
|
|
|
|
|
|
|
# subcmd.summary_help(name) |
|
70
|
|
|
|
|
|
|
# puts |
|
71
|
|
|
|
|
|
|
# puts '-' * 20 |
|
72
|
|
|
|
|
|
|
# puts subcmd.save_command |
|
73
|
|
|
|
|
|
|
} |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
1; |