Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Net:DNS:RR (sub-)classes and undefined methods

Reply
Thread Tools

Net:DNS:RR (sub-)classes and undefined methods

 
 
Rainer Weikusat
Guest
Posts: n/a
 
      10-25-2012
As I just discovered by accident (typo), when one tries to invoke an
undefined method using an object derived from Net:NS::RR as invocant,
the code will log the following nuisance error

Oct 25 17:28:25 marsh mes-configurator[15868]: #011
Oct 25 17:28:25 marsh mes-configurator[15868]: ***
Oct 25 17:28:25 marsh mes-configurator[15868]: *** WARNING!!! The program has attempted to call the method
Oct 25 17:28:25 marsh mes-configurator[15868]: *** "" for the following RR object:
Oct 25 17:28:25 marsh mes-configurator[15868]: ***
Oct 25 17:28:25 marsh mes-configurator[15868]: *** <binary RR here>
Oct 25 17:28:25 marsh mes-configurator[15868]: ***
Oct 25 17:28:25 marsh mes-configurator[15868]: *** This object does not have a method "". THIS IS A BUG
Oct 25 17:28:25 marsh mes-configurator[15868]: *** IN THE CALLING SOFTWARE, which has incorrectly assumed that
Oct 25 17:28:25 marsh mes-configurator[15868]: *** the object would be of a particular type. The calling
Oct 25 17:28:25 marsh mes-configurator[15868]: *** software should check the type of each RR object before
Oct 25 17:28:25 marsh mes-configurator[15868]: *** calling any of its methods.

instead of causing the program to abort as it should. Consequently, it
will continue to work with incorrect data instead[*]. Using this code
seems very unwise to me because of that.
[*] To add insult to injury, what caused this brainfart to be printed
was an attempt to get the type of the RR where a $ happened to be in
front of the method name because of a typo, ie, $rr->$type() instead
of $rr->type().
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to find the class methods of a class, just like'methods' finds the instance methods? Kenneth McDonald Ruby 5 09-26-2008 03:09 PM
Need a Ruby helper for finding undefined variables and methods CharlesWinstead@gmail.com Ruby 1 08-21-2007 07:26 PM
typeof x == 'undefined' or x == undefined? -Lost Javascript 13 01-31-2007 12:04 AM
undefined vs. undefined (was: new Array() vs []) VK Javascript 45 09-12-2006 05:26 PM
undefined behavior or not undefined behavior? That is the question Mantorok Redgormor C Programming 70 02-17-2004 02:46 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57