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