line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- coding: utf-8 -*- |
2
|
|
|
|
|
|
|
# Copyright (C) 2011, 2014-2015 Rocky Bernstein <rocky@cpan.org> |
3
|
12
|
|
|
12
|
|
103
|
use warnings; no warnings 'redefine'; no warnings 'once'; |
|
12
|
|
|
12
|
|
32
|
|
|
12
|
|
|
12
|
|
453
|
|
|
12
|
|
|
2
|
|
74
|
|
|
12
|
|
|
2
|
|
31
|
|
|
12
|
|
|
2
|
|
349
|
|
|
12
|
|
|
|
|
65
|
|
|
12
|
|
|
|
|
30
|
|
|
12
|
|
|
|
|
321
|
|
|
2
|
|
|
|
|
20
|
|
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
71
|
|
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
76
|
|
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
75
|
|
4
|
12
|
|
|
12
|
|
69
|
use rlib '../../../../..'; |
|
12
|
|
|
2
|
|
33
|
|
|
12
|
|
|
|
|
74
|
|
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
15
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Devel::Trepan::CmdProcessor::Command::Set::Confirm; |
7
|
|
|
|
|
|
|
|
8
|
12
|
|
|
12
|
|
4683
|
use Devel::Trepan::CmdProcessor::Command::Subcmd::Core; |
|
12
|
|
|
2
|
|
28
|
|
|
12
|
|
|
|
|
525
|
|
|
2
|
|
|
|
|
1031
|
|
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
93
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our @ISA = (Devel::Trepan::CmdProcessor::Command::SetBoolSubcmd); |
11
|
12
|
|
|
12
|
|
69
|
use strict; |
|
12
|
|
|
2
|
|
30
|
|
|
12
|
|
|
|
|
346
|
|
|
2
|
|
|
|
|
15
|
|
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
80
|
|
12
|
|
|
|
|
|
|
# Values inherited from parent |
13
|
12
|
|
|
12
|
|
70
|
use vars @Devel::Trepan::CmdProcessor::Command::Subcmd::SUBCMD_VARS; |
|
12
|
|
|
2
|
|
34
|
|
|
12
|
|
|
|
|
2324
|
|
|
2
|
|
|
|
|
15
|
|
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
480
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
## FIXME: do automatically. |
16
|
|
|
|
|
|
|
our $CMD = "set confirm"; |
17
|
|
|
|
|
|
|
=pod |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head2 Synopsis: |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
our $HELP = <<"HELP"; |
24
|
|
|
|
|
|
|
=pod |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
B<set confirm> [B<on>|B<off>] |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Set whether to confirm potentially dangerous operations. |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Note that some commands like |
31
|
|
|
|
|
|
|
L<C<quit>|Devel::Trepan::CmdProcessor::Command::Quit> and |
32
|
|
|
|
|
|
|
L<C<kill>|Devel::Trepan::CmdProcessor::Command::Kill> have a C<!> |
33
|
|
|
|
|
|
|
suffix which turns the confirmation off in that specific instance. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head2 See also: |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
L<C<show confirm>|Devel::Trepan::CmdProcessor::Command::Show::Confirm> |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
HELP |
41
|
|
|
|
|
|
|
our $SHORT_HELP = "Set whether to confirm potentially dangerous operations."; |
42
|
|
|
|
|
|
|
our $MIN_ABBREV = length('con'); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
unless (caller) { |
45
|
|
|
|
|
|
|
# Demo it. |
46
|
|
|
|
|
|
|
require Devel::Trepan::CmdProcessor::Mock; |
47
|
|
|
|
|
|
|
my ($proc, $cmd) = |
48
|
|
|
|
|
|
|
Devel::Trepan::CmdProcessor::Mock::subcmd_setup(); |
49
|
|
|
|
|
|
|
Devel::Trepan::CmdProcessor::Mock::subcmd_demo_bool($proc, $cmd); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |