add wantarray or string

This commit is contained in:
Colin GAGNAIRE 2018-01-19 13:34:10 +01:00
parent a9e52da83a
commit 51da04b5e3
1 changed files with 3 additions and 2 deletions

View File

@ -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;