add wantarray or string

This commit is contained in:
Colin GAGNAIRE 2018-01-19 13:34:10 +01:00
parent 30c63a59d7
commit b812a6ff50

View File

@ -42,8 +42,9 @@ sub new {
sub get_basic_credentials { sub get_basic_credentials {
my($self, $realm, $uri, $proxy) = @_; my($self, $realm, $uri, $proxy) = @_;
return if $proxy; return if $proxy;
return $self->{username}, $self->{password} if $self->{credentials}; return $self->{username}, $self->{password} if $self->{credentials} and wantarray;
return undef, undef; return $self->{username}.":".$self->{password} if $self->{credentials};
return undef;
} }
1; 1;