G'DAy mate

I run my program that uses the perl module Net:DNS

And recieve the error message

!!! WARNING The program has attempted to call the method "address" for the following RR object:
life.csu.edu.au. 86400 IN CNAME lorenz.mur.csu.edu.au
This method does not have an method "address" this is a BUG in the calling software,
which has inccorectly assumed that the object would be of an particular type.
The calling software should check the type of each RR object before calling any of it's methods.
Net:DNS has returned an undef to the caller.

This is part of my program that does a DNS lookup on inputed addresses then pings the address

# DNS LOOKUP ! $packet = $res->query($hostname); if (!$packet) { warn "Unable to lookup data for host from server"; } foreach $rr ($packet->answer) ##THE ERROR OCCURS HERE!!! { $result{$server}=$rr->address; } Data::Dumper->Dump([\%result],["result"]);
THANKS HELP FOR ANY HELP

Chad

20040526 Edit by Corion: Moved code into code tags


In reply to Warning message in Perl Net:DNS perl module address in DNS lookup!! by Chad_MacArthur

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.