sub credentials { my($self, $netloc, $realm, $uid, $pass) = @_; @{ $self->{'basic_authentication'}{lc($netloc)}{$realm} } = ($uid, $pass); } sub get_basic_credentials { my($self, $realm, $uri, $proxy) = @_; return if $proxy; my $host_port = lc($uri->host_port); if (exists $self->{'basic_authentication'}{$host_port}{$realm}) { return @{ $self->{'basic_authentication'}{$host_port}{$realm} }; } return (undef, undef); }