Here's the order I would try. You may like them in a different order or have better ideas.
- See if you can find a way to force LWP to pass a specific "Host:" header even though you are telling it what specific IP address to access in the URL.
- See if you can subclass something in LWP to be able to do your own DNS lookup, or to get access to the IP address resolved even when the request fails.
- Contact the LWP author(s) and see if they have suggestions or can modify the interface to support what you need.
- Write your own HTTP client, provided your needs are simple.
- Copy and edit the guts of LWP classes.
--
Eric Hammond