line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::OpenSSH::Constants; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.51_07'; |
4
|
|
|
|
|
|
|
|
5
|
5
|
|
|
5
|
|
30
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
133
|
|
6
|
5
|
|
|
5
|
|
20
|
use warnings; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
99
|
|
7
|
5
|
|
|
5
|
|
20
|
use Carp; |
|
5
|
|
|
|
|
13
|
|
|
5
|
|
|
|
|
206
|
|
8
|
5
|
|
|
5
|
|
24
|
use Scalar::Util (); |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
414
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
require Exporter; |
11
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
12
|
|
|
|
|
|
|
our %EXPORT_TAGS = (error => [], _state => []); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my %error = ( OSSH_MASTER_FAILED => 1, |
15
|
|
|
|
|
|
|
OSSH_SLAVE_FAILED => 2, |
16
|
|
|
|
|
|
|
OSSH_SLAVE_PIPE_FAILED => 3, |
17
|
|
|
|
|
|
|
OSSH_SLAVE_TIMEOUT => 4, |
18
|
|
|
|
|
|
|
OSSH_SLAVE_CMD_FAILED => 5, |
19
|
|
|
|
|
|
|
OSSH_SLAVE_SFTP_FAILED => 6, |
20
|
|
|
|
|
|
|
OSSH_ENCODING_ERROR => 7 |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
for my $key (keys %error) { |
24
|
5
|
|
|
5
|
|
25
|
no strict 'refs'; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
593
|
|
25
|
|
|
|
|
|
|
my $value = $error{$key}; |
26
|
|
|
|
|
|
|
*{$key} = sub () { $value }; |
27
|
|
|
|
|
|
|
push @{$EXPORT_TAGS{error}}, $key |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
my @states = qw(_STATE_START |
31
|
|
|
|
|
|
|
_STATE_LOGIN |
32
|
|
|
|
|
|
|
_STATE_AWAITING_MUX |
33
|
|
|
|
|
|
|
_STATE_RUNNING |
34
|
|
|
|
|
|
|
_STATE_KILLING |
35
|
|
|
|
|
|
|
_STATE_GONE |
36
|
|
|
|
|
|
|
_STATE_STOPPED); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $last_value; |
39
|
|
|
|
|
|
|
for my $state (@states) { |
40
|
5
|
|
|
5
|
|
31
|
no strict 'refs'; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
689
|
|
41
|
|
|
|
|
|
|
my $value = Scalar::Util::dualvar(++$last_value, $state); |
42
|
|
|
|
|
|
|
*{$state} = sub () { $value }; |
43
|
|
|
|
|
|
|
push @{$EXPORT_TAGS{_state}}, $state |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
our @EXPORT_OK = map { @{$EXPORT_TAGS{$_}} } keys %EXPORT_TAGS; |
47
|
|
|
|
|
|
|
$EXPORT_TAGS{all} = [@EXPORT_OK]; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |