blib/lib/Devel/Trepan/CmdProcessor/Command/Set_Subcmd/Substitute.pm untested

filter: Statementstmt 0.0% 0 / 44 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 10 Podpod n/a totaltotal 0.0% 0 / 58 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2013-2015 Rocky Bernstein <rocky@cpan.org>
3 use warnings; no warnings 'redefine'; no warnings 'once';
4 use rlib '../../../../..';
5 use strict;
6 use vars qw(@ISA @SUBCMD_VARS);
7  
8 package Devel::Trepan::CmdProcessor::Command::Set::Substitute;
9  
10 use Devel::Trepan::CmdProcessor::Command::Subcmd::Core;
11 use Devel::Trepan::CmdProcessor::Command::Subcmd::SubsubMgr;
12 use vars qw(@ISA @SUBCMD_VARS);
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;