Subject: | _bad_host() fails for empty addresses |
The function _bad_host() is suppose to check the validity of an address.
Unfortunately, if somehow the address which gets there is empty, the
cascade of IFs keeps skipping it until the last "else" brach, where it
is treated as being a full address (X.X.X.X), which, being empty, fails
with the error
Use of uninitialized value $parts[0] in numeric gt (>) at
/usr/local/share/perl/5.10.0/LWPx/ParanoidAgent.pm line 160
Use of uninitialized value $parts[1] in numeric gt (>) at
/usr/local/share/perl/5.10.0/LWPx/ParanoidAgent.pm line 160
Use of uninitialized value $parts[2] in numeric gt (>) at
/usr/local/share/perl/5.10.0/LWPx/ParanoidAgent.pm line 160
Use of uninitialized value $parts[3] in numeric gt (>) at
/usr/local/share/perl/5.10.0/LWPx/ParanoidAgent.pm line 160
The code can be fixed modifying the ParanoidAgent.pm file at line 125
with the following piece of code
return 0 if ((not @parts) || (@parts > 4));
I would submit a fix, but do not seem to be possible here.