[Vienna-pm] Defensive Programmierung

Peter J. Holzer hjp-vienna-pm-list at hjp.at
Sun Apr 20 00:59:11 PDT 2008


use Net::DNS;

[...]

main::check_a(check.pl:67):                 if ($ans->type eq 'A') {
  DB<1>
main::check_a(check.pl:68):                     push @addrs, $ans->ptrdaddr;
  DB<1>

***
***  WARNING!!!  The program has attempted to call the method
***  "ptrdaddr" for the following RR object:
***
***  hrunkner.hjp.at.   86400   IN      A       81.223.91.232
***
***  This object does not have a method "ptrdaddr".  THIS IS A BUG
***  IN THE CALLING SOFTWARE, which has incorrectly assumed that
***  the object would be of a particular type.  The calling
***  software should check the type of each RR object before
***  calling any of its methods.
***
***  Net::DNS has returned undef to the caller.
*** 

Hypsch.

	hp

-- 
   _  | Peter J. Holzer    | It took a genius to create [TeX],
|_|_) | Sysadmin WSR       | and it takes a genius to maintain it.
| |   | hjp at hjp.at         | That's not engineering, that's art.
__/   | http://www.hjp.at/ |	-- David Kastrup in comp.text.tex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.pm.org/pipermail/vienna-pm/attachments/20080420/193d2299/attachment.bin 


More information about the Vienna-pm mailing list