mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-28 08:04:36 +02:00
add wantarray or string
This commit is contained in:
parent
30c63a59d7
commit
b812a6ff50
@ -42,8 +42,9 @@ sub new {
|
||||
sub get_basic_credentials {
|
||||
my($self, $realm, $uri, $proxy) = @_;
|
||||
return if $proxy;
|
||||
return $self->{username}, $self->{password} if $self->{credentials};
|
||||
return undef, undef;
|
||||
return $self->{username}, $self->{password} if $self->{credentials} and wantarray;
|
||||
return $self->{username}.":".$self->{password} if $self->{credentials};
|
||||
return undef;
|
||||
}
|
||||
|
||||
1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user