[opensuse] Alternative to perl Net::DNS::Resolver ?
I've just now discovered that the perl module/class Net::DNS::Resolver doesn't consult /etc/hosts when doing lookups, which is a problem - does anyone know of an alternative module for doing DNS lookups in perl? thanks Per -- Per Jessen, Zürich (20.9°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Per Jessen wrote:
I've just now discovered that the perl module/class Net::DNS::Resolver doesn't consult /etc/hosts when doing lookups, which is a problem - does anyone know of an alternative module for doing DNS lookups in perl?
Dunno whether it does what you want, but POE::Component::Client::DNS says it looks at /etc/hosts Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Dave Howorth wrote:
Per Jessen wrote:
I've just now discovered that the perl module/class Net::DNS::Resolver doesn't consult /etc/hosts when doing lookups, which is a problem - does anyone know of an alternative module for doing DNS lookups in perl?
Dunno whether it does what you want, but POE::Component::Client::DNS says it looks at /etc/hosts
Yeah, I think I did spot that whilst googling. It doesn't quite fit the spec though - I need a drop-in replacement for Net::DNS::Resolver. Or as close as it gets. I really don't get why people have to reinvent the wheel over and over again - why doesn't Net::DNS::Resolver just interface with e.g. getaddrinfo() thereby reducing amount code and improving compatibility, in particular looking up /etc/hosts .... aarrrg [sounds of hair leaving head]. Dave, thanks for the suggestion nonetheless. /Per -- Per Jessen, Zürich (23.3°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Per Jessen wrote:
I really don't get why people have to reinvent the wheel over and over again - why doesn't Net::DNS::Resolver just interface with e.g. getaddrinfo()
Well, I guess it's some sort of portability thing - I've now found a perl module that interfaces directly to getaddrinfo(), which is more like what I need - maybe Windows (or some other perl platform) doesn't have getaddrinfo() ? /Per -- Per Jessen, Zürich (17.8°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, Jun 26, 2009 at 04:59:51PM +0200, Per Jessen wrote:
I've just now discovered that the perl module/class Net::DNS::Resolver doesn't consult /etc/hosts when doing lookups, which is a problem - does anyone know of an alternative module for doing DNS lookups in perl?
Use the standard gethostbyname() function? Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Michael Schroeder wrote:
On Fri, Jun 26, 2009 at 04:59:51PM +0200, Per Jessen wrote:
I've just now discovered that the perl module/class Net::DNS::Resolver doesn't consult /etc/hosts when doing lookups, which is a problem - does anyone know of an alternative module for doing DNS lookups in perl?
Use the standard gethostbyname() function?
Good suggestion, but every now and then I also need to retrieve specific record types, and I'd prefer not to have two DNS interfaces. Looks like I might have to. Thanks. /Per -- Per Jessen, Zürich (21.8°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Per Jessen wrote:
Michael Schroeder wrote:
On Fri, Jun 26, 2009 at 04:59:51PM +0200, Per Jessen wrote:
I've just now discovered that the perl module/class Net::DNS::Resolver doesn't consult /etc/hosts when doing lookups, which is a problem - does anyone know of an alternative module for doing DNS lookups in perl?
Use the standard gethostbyname() function?
Good suggestion,
Michael, actually the best suggestion so far, I think I'll use gethostbyname() for retrieving A records. Thanks again, I can't believe I didn't think of that myself. /Per -- Per Jessen, Zürich (22.5°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Per Jessen wrote:
Per Jessen wrote:
Michael, actually the best suggestion so far, I think I'll use gethostbyname() for retrieving A records. Thanks again, I can't believe I didn't think of that myself.
Okay, I'm not much of a perl programmer - how do I make gethostbyname() give me all IP-addresses for a given hostname? /Per -- Per Jessen, Zürich (23.2°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Per Jessen wrote:
Per Jessen wrote:
Per Jessen wrote:
Michael, actually the best suggestion so far, I think I'll use gethostbyname() for retrieving A records. Thanks again, I can't believe I didn't think of that myself.
Okay, I'm not much of a perl programmer - how do I make gethostbyname() give me all IP-addresses for a given hostname?
Plz ignore. /Per -- Per Jessen, Zürich (23.3°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Dave Howorth
-
Michael Schroeder
-
Per Jessen