Possibility to force domain=>ip for useragent->request($request....

[email protected] (Jesper Persson) Fri, 23 Sep 2011 13:01:28 +0200
Newsgroups perl.libwww
Message-ID <CA+uC3V3bjs0==Sp5TwoMn3KTMd2iXU7u3KtbVoXuTFETf=aa2Q@mail.gmail.com>
Hi everybody,

is there some way of forcing what ip-address useragent->request connects to
when you make a http request to some website?
If I already know what ip-address a domain resolves to and dont want to rely
on the local dns og hosts file, it would be great if you could force perl to
use a specific ip-address.

In site/lib/LWP/Protocol/http.pm I can see the line:
   # connect to remote site
   my $socket = $self->_new_socket($host, $port, $timeout);

I am guessing that it should be there that an ip should be inserted instead
of the $host.

If there isn't a way to do it already, do you think it could be relevant in
the LWP?

Regards
Jesper Persson