raindog308 has asked for the wisdom of the Perl Monks concerning the following question:
Say I'm on a typical Unix server that has DNS. nsswitch.conf is setup to look at the local /etc/hosts first and then DNS.
Now let's say that I want to tell a perl script "before you look at /etc/hosts and DNS, look at this alternative hosts file instead because I want to override some addresses." Is that possible?
I realize I could write things in the perl script or create a config file for the script, etc., but I'm wondering if there is a way to tell perl to resolve IP addresses differently than the common system way. (Specifically, when using LWP to get HTTP/HTTPS objects.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tell perl to use an alternate hosts file?
by roboticus (Chancellor) on Dec 16, 2010 at 13:44 UTC | |
|
Re: Tell perl to use an alternate hosts file?
by wwe (Friar) on Dec 16, 2010 at 08:15 UTC |