File Coverage

blib/lib/Net/SFTP/Util.pm
Criterion Covered Total %
statement 15 16 93.7
branch 0 2 0.0
condition n/a
subroutine 5 6 83.3
pod 1 1 100.0
total 21 25 84.0


line stmt bran cond sub pod time code
1             # $Id: Util.pm,v 1.4 2001/05/22 04:28:00 btrott Exp $
2              
3             package Net::SFTP::Util;
4 2     2   11 use strict;
  2         4  
  2         49  
5              
6 2     2   12 use Net::SFTP::Constants qw( :status );
  2         4  
  2         10  
7              
8 2     2   12 use vars qw( @ISA @EXPORT_OK );
  2         5  
  2         97  
9 2     2   14 use Exporter;
  2         4  
  2         109  
10             @ISA = qw( Exporter );
11             @EXPORT_OK = qw( fx2txt );
12              
13 2     2   14 use vars qw( %ERRORS );
  2         3  
  2         200  
14             %ERRORS = (
15             SSH2_FX_OK() => "No error",
16             SSH2_FX_EOF() => "End of file",
17             SSH2_FX_NO_SUCH_FILE() => "No such file or directory",
18             SSH2_FX_PERMISSION_DENIED() => "Permission denied",
19             SSH2_FX_FAILURE() => "Failure",
20             SSH2_FX_BAD_MESSAGE() => "Bad message",
21             SSH2_FX_NO_CONNECTION() => "No connection",
22             SSH2_FX_CONNECTION_LOST() => "Connection lost",
23             SSH2_FX_OP_UNSUPPORTED() => "Operation unsupported",
24             );
25              
26 0 0   0 1   sub fx2txt { exists $ERRORS{$_[0]} ? $ERRORS{$_[0]} : "Unknown status" }
27              
28             1;
29             __END__