1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
package Net::OpenSSH::Parallel::Constants;
our $VERSION = '0.12';
use strict;
use warnings;
use Carp;
use Net::OpenSSH::Constants qw(:all);
require Exporter;
our @ISA = qw(Exporter);
our %EXPORT_TAGS = %Net::OpenSSH::Constants::EXPORT_TAGS;
$EXPORT_TAGS{error} = [@{$EXPORT_TAGS{error}}];
delete $EXPORT_TAGS{all};
our %error = ( OSSH_JOIN_FAILED => 100,
OSSH_ABORTED => 101,
OSSH_GOTO_FAILED => 102 );
our %on_error = ( OSSH_ON_ERROR_IGNORE => 201,
OSSH_ON_ERROR_DONE => 202,
OSSH_ON_ERROR_ABORT => 203,
OSSH_ON_ERROR_ABORT_ALL => 204,
OSSH_ON_ERROR_RETRY => 205 );
for my $hash (qw(error on_error)) {
no strict 'refs';
for my $key (keys %$hash) {
my $value = $hash->{$key};
*{$key} = sub () { $value };
push @{$EXPORT_TAGS{$hash}}, $key
}
}
our @EXPORT_OK = map { @{$EXPORT_TAGS{$_}} } keys %EXPORT_TAGS;
$EXPORT_TAGS{all} = [@EXPORT_OK];
1;
__END__
=head1 NAME
Net::OpenSSH::Parallel::Constants - Constant definitions for Net::OpenSSH::Parallel
=head1 SYNOPSIS
use Net::OpenSSH::Parallel::Constants qw(:error :on_error);
=head1 DESCRIPTION
This module exports all the constants available from L<Net::OpenSSH>
plus the following ones:
=over 4
=item :error
Besides the error codes defined in Net::OpenSSH this module also
defines:
OSSH_JOIN_FAILED
OSSH_ABORTED
OSSH_GOTO_FAILED
=item :on_error
OSSH_ON_ERROR_IGNORE
OSSH_ON_ERROR_RETRY
OSSH_ON_ERROR_DONE
OSSH_ON_ERROR_ABORT
OSSH_ON_ERROR_ABORT_ALL
=back
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2009, 2011, 2012 by Salvador FandiE<ntilde>o (sfandino@yahoo.com)
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.10.0 or,
at your option, any later version of Perl 5 you may have available.
=cut
|