Skip Menu |

This queue is for tickets about the Net-DNS CPAN distribution.

Report information
The Basics
Id: 13832
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: tengi [...] CS.Princeton.EDU
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.52
Fixed in: (no value)



Subject: Can't locate auto/Net/DNS/Resolver.al
I'm trying to use Net::DNS::Resolver (v 0.52) with Net::XMPP, XML::Stream and perl 5.8.5 under Solaris 9. I installed Net::DNS from www.net-dns.org, and the install appeared to be clean. When I run my script, it causes the XML module to try to autoload the Net::DNS::Resolver code, which fails with the following message: Can't locate auto/Net/DNS/Resolver.al in @INC (@INC contains: /usr/local/lib/perl5/5.8.5/sun4-solaris /usr/local/lib/perl5/5.8.5 /usr/local/lib/perl5/site_perl/5.8.5/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.5 /usr/local/lib/perl5/site_perl/5.6.2 /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl .) at /usr/local/lib/perl5/site_perl/5.8.5/XML/Stream.pm line 683 I'm not great with OO module code, but I *think* the lines of interest from XML/Stream.pm are (the 'new' is line 683): ======== if (eval "require Net::DNS;" ) { require Net::DNS; import Net::DNS; $NETDNS = 1; } else { $NETDNS = 0; } ... if ($NETDNS) { my $res = new Net::DNS::Resolver(); my $query = $res->query($self->{SIDS}->{newconnection}->{srv}.".".$self->{SIDS}->{newconnection}->{hostname},"SRV"); if ($query) { $self->{SIDS}->{newconnection}->{hostname} = ($query->answer)[0]->target(); $self->{SIDS}->{newconnection}->{port} = ($query->answer)[0]->port(); $self->debug(1,"Connect: srv host: $self->{SIDS}->{newconnection}->{hostname}"); $self->debug(1,"Connect: srv post: $self->{SIDS}->{newconnection}->{port}"); } else { $self->debug(1,"Connect: srv query failed"); } } else { $self->debug(1,"Connect: srv query failed"); } ======== Note that I have the same problem with perl 5.8.5 under Linux (RHAS3). I could probably hack the Stream.pm module to just use Net::DNS regardless, but I'm not sure I could do it without causing any damage. :-) Would you please let me know if I did anything wrong or missed something. From my reading of the AutoSplit documentation, it *looks* like the fix may be as simple as adding "sub *" lines after the __END__ in Net/DNS/Resolver.pm, but I'm not so sure I have that right. Please let me know the right way to get this working. Thanks!
I'll be honest; I do not have a clue why this happens. Net::DNS does not rely on autoloading at all. Try to use no AutoLoader; in your script and see what happens. It might be a workaround. --Olaf
doughhh.. Rereading the code fragment again I noticed: my $res = new Net::DNS::Resolver(); That should have been : my $res= Net::DNS::Resolver->new(); Obviously Resolver() is not a function I've reported the bug: Ticket 13917 created in queue 'XML-Stream'. Closing this ticket. --Olaf