line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- coding: utf-8 -*- |
2
|
|
|
|
|
|
|
# Copyright (C) 2013-2015 Rocky Bernstein <rocky@cpan.org> |
3
|
12
|
|
|
12
|
|
97
|
use warnings; no warnings 'redefine'; no warnings 'once'; |
|
12
|
|
|
12
|
|
35
|
|
|
12
|
|
|
12
|
|
440
|
|
|
12
|
|
|
2
|
|
76
|
|
|
12
|
|
|
2
|
|
33
|
|
|
12
|
|
|
2
|
|
361
|
|
|
12
|
|
|
|
|
74
|
|
|
12
|
|
|
|
|
32
|
|
|
12
|
|
|
|
|
440
|
|
|
2
|
|
|
|
|
23
|
|
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
99
|
|
|
2
|
|
|
|
|
17
|
|
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
81
|
|
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
74
|
|
4
|
12
|
|
|
12
|
|
76
|
use rlib '../../../../..'; |
|
12
|
|
|
2
|
|
34
|
|
|
12
|
|
|
|
|
75
|
|
|
2
|
|
|
|
|
15
|
|
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
16
|
|
5
|
12
|
|
|
12
|
|
4794
|
use strict; |
|
12
|
|
|
2
|
|
34
|
|
|
12
|
|
|
|
|
339
|
|
|
2
|
|
|
|
|
1413
|
|
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
99
|
|
6
|
12
|
|
|
12
|
|
66
|
use vars qw(@ISA @SUBCMD_VARS); |
|
12
|
|
|
2
|
|
30
|
|
|
12
|
|
|
|
|
653
|
|
|
2
|
|
|
|
|
18
|
|
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
706
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package Devel::Trepan::CmdProcessor::Command::Set::Substitute; |
9
|
|
|
|
|
|
|
|
10
|
12
|
|
|
12
|
|
76
|
use Devel::Trepan::CmdProcessor::Command::Subcmd::Core; |
|
12
|
|
|
2
|
|
35
|
|
|
12
|
|
|
|
|
310
|
|
|
2
|
|
|
|
|
20
|
|
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
78
|
|
11
|
12
|
|
|
12
|
|
72
|
use Devel::Trepan::CmdProcessor::Command::Subcmd::SubsubMgr; |
|
12
|
|
|
2
|
|
33
|
|
|
12
|
|
|
|
|
263
|
|
|
2
|
|
|
|
|
20
|
|
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
89
|
|
12
|
12
|
|
|
12
|
|
63
|
use vars qw(@ISA @SUBCMD_VARS); |
|
12
|
|
|
2
|
|
29
|
|
|
12
|
|
|
|
|
2990
|
|
|
2
|
|
|
|
|
19
|
|
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
777
|
|
13
|
|
|
|
|
|
|
our $MIN_ABBREV = length('sub'); |
14
|
|
|
|
|
|
|
=head2 Synopsis: |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
our $HELP = <<"HELP"; |
18
|
|
|
|
|
|
|
=pod |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
B<set substitute> [I<subcommand>] |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Sometimes the filename or line ranges reported inside the debugger |
23
|
|
|
|
|
|
|
might not match the filenames or line ranges where you can find the |
24
|
|
|
|
|
|
|
source in the OS filesystem. This may happen because of pathnames do |
25
|
|
|
|
|
|
|
not match or program text comes from evaluated lines in code. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head2 See Also |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
L<C<set substitute path>|Devel::Trepan::CmdProcessor::Command::Set::Substutute::Path>, and |
30
|
|
|
|
|
|
|
L<C<set substitute string>|Devel::Trepan::CmdProcessor::Command::Set::Substutute::String>. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
HELP |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
our $SHORT_HELP = "Set filename remapping"; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
@ISA = qw(Devel::Trepan::CmdProcessor::Command::SubsubcmdMgr); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
unless (caller) { |
40
|
|
|
|
|
|
|
# Demo it. |
41
|
|
|
|
|
|
|
# FIXME: DRY with other subcommand manager demo code. |
42
|
|
|
|
|
|
|
require Devel::Trepan::CmdProcessor::Mock; |
43
|
|
|
|
|
|
|
my ($proc, $cmd) = |
44
|
|
|
|
|
|
|
Devel::Trepan::CmdProcessor::Mock::subcmd_setup(); |
45
|
|
|
|
|
|
|
Devel::Trepan::CmdProcessor::Mock::subcmd_demo_info($proc, $cmd); |
46
|
|
|
|
|
|
|
$cmd->run($cmd->{prefix}); |
47
|
|
|
|
|
|
|
my @args = (@{$cmd->{prefix}}, 'path', 'a', __FILE__); |
48
|
|
|
|
|
|
|
$cmd->run(\@args); |
49
|
|
|
|
|
|
|
for my $arg ('pa', 's') { |
50
|
|
|
|
|
|
|
my @aref = $cmd->complete_token_with_next($arg); |
51
|
|
|
|
|
|
|
printf "%s\n", @aref ? $aref[0]->[0]: 'undef'; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |