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
|
|
12
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
53
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
13
|
use Net::SFTP::Constants qw( :status ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
9
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
10
|
use vars qw( @ISA @EXPORT_OK ); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
72
|
|
9
|
2
|
|
|
2
|
|
10
|
use Exporter; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
85
|
|
10
|
|
|
|
|
|
|
@ISA = qw( Exporter ); |
11
|
|
|
|
|
|
|
@EXPORT_OK = qw( fx2txt ); |
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
2
|
|
9
|
use vars qw( %ERRORS ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
222
|
|
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__ |