enhance indent
This commit is contained in:
parent
c9aa044ff2
commit
a85fc16ea4
|
@ -32,7 +32,7 @@ sub new {
|
|||
|
||||
if (!defined($options{noptions}) || $options{noptions} != 1) {
|
||||
$options{options}->add_options(arguments => {
|
||||
"curl-opt:s@" => { name => 'curl_opt' },
|
||||
'curl-opt:s@' => { name => 'curl_opt' },
|
||||
});
|
||||
$options{options}->add_help(package => __PACKAGE__, sections => 'BACKEND CURL OPTIONS', once => 1);
|
||||
}
|
||||
|
@ -45,10 +45,16 @@ sub new {
|
|||
sub check_options {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
centreon::plugins::misc::mymodule_load(output => $self->{output}, module => 'Net::Curl::Easy',
|
||||
error_msg => "Cannot load module 'Net::Curl::Easy'.");
|
||||
centreon::plugins::misc::mymodule_load(output => $self->{output}, module => 'centreon::plugins::backend::http::curlconstants',
|
||||
error_msg => "Cannot load module 'centreon::plugins::backend::http::curlconstants'.");
|
||||
centreon::plugins::misc::mymodule_load(
|
||||
output => $self->{output},
|
||||
module => 'Net::Curl::Easy',
|
||||
error_msg => "Cannot load module 'Net::Curl::Easy'."
|
||||
);
|
||||
centreon::plugins::misc::mymodule_load(
|
||||
output => $self->{output},
|
||||
module => 'centreon::plugins::backend::http::curlconstants',
|
||||
error_msg => "Cannot load module 'centreon::plugins::backend::http::curlconstants'."
|
||||
);
|
||||
$self->{constant_cb} = \¢reon::plugins::backend::http::curlconstants::get_constant_value;
|
||||
|
||||
foreach (('unknown_status', 'warning_status', 'critical_status')) {
|
||||
|
@ -373,8 +379,10 @@ sub request {
|
|||
my $short_msg = $self->{response_code} . ' ' .
|
||||
(defined($http_code_explained->{$self->{response_code}}) ? $http_code_explained->{$self->{response_code}} : 'unknown');
|
||||
|
||||
$self->{output}->output_add(severity => $status,
|
||||
short_msg => $short_msg);
|
||||
$self->{output}->output_add(
|
||||
severity => $status,
|
||||
short_msg => $short_msg
|
||||
);
|
||||
$self->{output}->display();
|
||||
$self->{output}->exit();
|
||||
}
|
||||
|
|
|
@ -33,8 +33,8 @@ sub new {
|
|||
|
||||
if (!defined($options{noptions}) || $options{noptions} != 1) {
|
||||
$options{options}->add_options(arguments => {
|
||||
"ssl:s" => { name => 'ssl' },
|
||||
"ssl-opt:s@" => { name => 'ssl_opt' },
|
||||
'ssl:s' => { name => 'ssl' },
|
||||
'ssl-opt:s@' => { name => 'ssl_opt' },
|
||||
});
|
||||
$options{options}->add_help(package => __PACKAGE__, sections => 'BACKEND LWP OPTIONS', once => 1);
|
||||
}
|
||||
|
@ -263,8 +263,10 @@ sub request {
|
|||
$self->{response}->www_authenticate =~ /(\S+)/);
|
||||
}
|
||||
|
||||
$self->{output}->output_add(severity => $status,
|
||||
short_msg => $short_msg);
|
||||
$self->{output}->output_add(
|
||||
severity => $status,
|
||||
short_msg => $short_msg
|
||||
);
|
||||
$self->{output}->display();
|
||||
$self->{output}->exit();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue