1
package Net::OpenSSH::Constants;
3
our $VERSION = '0.51_07';
10
our @ISA = qw(Exporter);
11
our %EXPORT_TAGS = (error => []);
13
my %error = ( OSSH_MASTER_FAILED => 1,
14
OSSH_SLAVE_FAILED => 2,
15
OSSH_SLAVE_PIPE_FAILED => 3,
16
OSSH_SLAVE_TIMEOUT => 4,
17
OSSH_SLAVE_CMD_FAILED => 5,
18
OSSH_SLAVE_SFTP_FAILED => 6,
19
OSSH_ENCODING_ERROR => 7
22
for my $key (keys %error) {
24
my $value = $error{$key};
25
*{$key} = sub () { $value };
26
push @{$EXPORT_TAGS{error}}, $key
29
our @EXPORT_OK = map { @{$EXPORT_TAGS{$_}} } keys %EXPORT_TAGS;
30
$EXPORT_TAGS{all} = [@EXPORT_OK];
38
Net::OpenSSH::Constants - Constant definitions for Net::OpenSSH
42
use Net::OpenSSH::Constants qw(:error);
46
This module exports the following constants:
52
OSSH_MASTER_FAILED - some error related to the master SSH connection happened
53
OSSH_SLAVE_FAILED - some error related to a slave SSH connection happened
54
OSSH_SLAVE_PIPE_FAILED - unable to create pipe to communicate with slave process
55
OSSH_SLAVE_TIMEOUT - slave process timeout
56
OSSH_SLAVE_CMD_FAILED - child process exited with a non zero status
57
OSSH_SLAVE_SFTP_FAILED - creation of SFTP client failed
58
OSS_ENCODING_ERROR - some error related to the encoding/decoding of strings happened
62
=head1 COPYRIGHT AND LICENSE
64
Copyright (C) 2008, 2009 by Salvador FandiE<ntilde>o (sfandino@yahoo.com)
66
This library is free software; you can redistribute it and/or modify
67
it under the same terms as Perl itself, either Perl version 5.10.0 or,
68
at your option, any later version of Perl 5 you may have available.