line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- coding: utf-8 -*- |
2
|
|
|
|
|
|
|
# Copyright (C) 2011-2015 Rocky Bernstein <rocky@cpan.org> |
3
|
12
|
|
|
12
|
|
83
|
use warnings; no warnings 'redefine'; no warnings 'once'; |
|
12
|
|
|
12
|
|
32
|
|
|
12
|
|
|
12
|
|
497
|
|
|
12
|
|
|
|
|
72
|
|
|
12
|
|
|
|
|
34
|
|
|
12
|
|
|
|
|
435
|
|
|
12
|
|
|
|
|
69
|
|
|
12
|
|
|
|
|
33
|
|
|
12
|
|
|
|
|
761
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Devel::Trepan::CmdProcessor::Command::Set::Auto::List; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
BEGIN { |
8
|
12
|
|
|
12
|
|
84
|
my @OLD_INC = @INC; |
9
|
12
|
|
|
12
|
|
81
|
use rlib '../../../../../..'; |
|
12
|
|
|
|
|
33
|
|
|
12
|
|
|
|
|
146
|
|
10
|
12
|
|
|
12
|
|
6045
|
use Devel::Trepan::CmdProcessor::Command::Subcmd::Subsubcmd; |
|
12
|
|
|
|
|
53
|
|
|
12
|
|
|
|
|
395
|
|
11
|
12
|
|
|
|
|
314
|
@INC = @OLD_INC |
12
|
|
|
|
|
|
|
}; |
13
|
|
|
|
|
|
|
|
14
|
12
|
|
|
12
|
|
67
|
use strict; |
|
12
|
|
|
|
|
32
|
|
|
12
|
|
|
|
|
309
|
|
15
|
12
|
|
|
12
|
|
65
|
use vars qw(@ISA @SUBCMD_VARS); |
|
12
|
|
|
|
|
30
|
|
|
12
|
|
|
|
|
822
|
|
16
|
|
|
|
|
|
|
@ISA = qw(Devel::Trepan::CmdProcessor::Command::SetBoolSubsubcmd); |
17
|
|
|
|
|
|
|
# Values inherited from parent |
18
|
|
|
|
|
|
|
|
19
|
12
|
|
|
12
|
|
71
|
use vars @Devel::Trepan::CmdProcessor::Command::Subsubcmd::SUBCMD_VARS; |
|
12
|
|
|
|
|
34
|
|
|
12
|
|
|
|
|
1474
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
our $IN_LIST = 1; |
22
|
|
|
|
|
|
|
our $HELP = <<'HELP'; |
23
|
|
|
|
|
|
|
=pod |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
B<set auto list> [B<on>|B<off>] |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Set to run a C<list> command each time we enter the debugger. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 See also: |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
L<C<show auto list>|Devel::Trepan::CmdProcessor::Command::Show::Auto::List> |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
HELP |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
our $MIN_ABBREV = length('li'); |
37
|
12
|
|
|
12
|
|
79
|
use constant MAX_ARGS => 1; |
|
12
|
|
|
|
|
31
|
|
|
12
|
|
|
|
|
2341
|
|
38
|
|
|
|
|
|
|
our $SHORT_HELP = "Set to run a 'list' command each time we enter the debugger"; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub run($$) |
41
|
|
|
|
|
|
|
{ |
42
|
0
|
|
|
0
|
|
|
my ($self, $args) = @_; |
43
|
0
|
|
|
|
|
|
$self->SUPER::run($args); |
44
|
0
|
|
|
|
|
|
my $proc = $self->{proc}; |
45
|
0
|
0
|
|
|
|
|
if ( $proc->{settings}{autolist} ) { |
46
|
|
|
|
|
|
|
$proc->{cmdloop_prehooks}->insert_if_new(10, $proc->{autolist_hook}[0], |
47
|
0
|
|
|
|
|
|
$proc->{autolist_hook}[1]); |
48
|
|
|
|
|
|
|
} else { |
49
|
0
|
|
|
|
|
|
$proc->{cmdloop_prehooks}->delete_by_name('autolist'); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
unless (caller) { |
54
|
|
|
|
|
|
|
# Demo it. |
55
|
|
|
|
|
|
|
# require_relative '../../../mock' |
56
|
|
|
|
|
|
|
# name = File.basename(__FILE__, '.rb') |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
# dbgr, set_cmd = MockDebugger::setup('set') |
59
|
|
|
|
|
|
|
# max_cmd = Trepan::SubSubcommand::SetMax.new(dbgr.core.processor, |
60
|
|
|
|
|
|
|
# set_cmd) |
61
|
|
|
|
|
|
|
# cmd_ary = Trepan::SubSubcommand::SetMaxList::PREFIX |
62
|
|
|
|
|
|
|
# cmd_name = cmd_ary.join(' ') |
63
|
|
|
|
|
|
|
# subcmd = Trepan::SubSubcommand::SetMaxList.new(set_cmd.proc, |
64
|
|
|
|
|
|
|
# max_cmd, |
65
|
|
|
|
|
|
|
# cmd_name) |
66
|
|
|
|
|
|
|
# prefix_run = cmd_ary[1..-1] |
67
|
|
|
|
|
|
|
# subcmd.run(prefix_run) |
68
|
|
|
|
|
|
|
# subcmd.run(prefix_run + %w(0)) |
69
|
|
|
|
|
|
|
# subcmd.run(prefix_run + %w(20)) |
70
|
|
|
|
|
|
|
# name = File.basename(__FILE__, '.rb') |
71
|
|
|
|
|
|
|
# subcmd.summary_help(name) |
72
|
|
|
|
|
|
|
# puts |
73
|
|
|
|
|
|
|
# puts '-' * 20 |
74
|
|
|
|
|
|
|
# puts subcmd.save_command |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
1; |