File Coverage

lib/App/Tel/Macro.pm
Criterion Covered Total %
statement 6 12 50.0
branch n/a
condition n/a
subroutine 2 4 50.0
pod 2 2 100.0
total 10 18 55.5


line stmt bran cond sub pod time code
1             package App::Tel::Macro;
2              
3 6     6   26 use strict;
  6         68  
  6         146  
4 6     6   32 use warnings;
  6         11  
  6         762  
5              
6             require Exporter;
7             our @ISA = qw(Exporter);
8             our @EXPORT = qw( handle_backspace handle_ctrl_z );
9              
10             =head2 handle_backspace
11              
12             Handle backspace for routers that use ^H
13              
14             =cut
15              
16             sub handle_backspace {
17 0     0 1   ${$_[0]}->send("\b");
  0            
18 0           return 1;
19             }
20              
21             =head2 handle_ctrl_z
22              
23             Handle ctrl_z for non-cisco boxes
24              
25             =cut
26              
27             sub handle_ctrl_z {
28 0     0 1   ${$_[0]}->send("exit\r");
  0            
29 0           return 1;
30             }
31              
32             1;