File Coverage

lib/Devel/Trepan/CmdProcessor/Command/Show_Subcmd/Max_Subcmd/Lines.pm
Criterion Covered Total %
statement 24 24 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod n/a
total 32 32 100.0


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   90 use warnings; no warnings 'redefine'; no warnings 'once';
  12     12   36  
  12     12   599  
  12         73  
  12         30  
  12         398  
  12         77  
  12         35  
  12         384  
4 12     12   74 use rlib '../../../../../..';
  12         34  
  12         76  
5              
6             package Devel::Trepan::CmdProcessor::Command::Show::Max::Lines;
7              
8 12     12   5049 use Devel::Trepan::CmdProcessor::Command::Subcmd::Subsubcmd;
  12         33  
  12         281  
9              
10 12     12   60 use strict;
  12         38  
  12         272  
11 12     12   64 use vars qw(@ISA @SUBCMD_VARS);
  12         34  
  12         793  
12             @ISA = qw(Devel::Trepan::CmdProcessor::Command::ShowIntSubsubcmd);
13             # Values inherited from parent
14              
15 12     12   73 use vars @Devel::Trepan::CmdProcessor::Command::Subsubcmd::SUBCMD_VARS;
  12         31  
  12         2952  
16              
17             our $IN_LIST = 1;
18             our $MIN_ABBREV = length('lines');
19             =pod
20              
21             =head2 Synopsis:
22              
23             =cut
24              
25             our $HELP = <<"HELP";
26             =pod
27              
28             B<show max lines>
29              
30             Set maximum number of lines of trailing context around the source line.
31              
32              
33             =head2 See also:
34              
35             L<C<set max lines>|Devel::Trepan::CmdProcessor::Set::Max::Lines>
36              
37             =cut
38             HELP
39              
40             our $SHORT_HELP = 'Show the number of characters the debugger thinks are in a line';
41              
42             unless (caller) {
43             require Devel::Trepan::CmdProcessor;
44             my $cmdproc = Devel::Trepan::CmdProcessor->new();
45             my $subcmd = Devel::Trepan::CmdProcessor::Command::Show->new($cmdproc, 'set');
46             my $parent_cmd = Devel::Trepan::CmdProcessor::Command::Show::Max->new($subcmd, 'lines');
47             my $cmd = __PACKAGE__->new($parent_cmd, 'lines');
48             # Add common routine
49             foreach my $field (qw(min_abbrev name)) {
50             printf "Field %s is: %s\n", $field, $cmd->{$field};
51             }
52             my @args = qw(show max lines);
53             $cmd->run(\@args);
54             }
55              
56             1;