Subject: | bgsend socket error detection |
Hi Olaf,
It appears there is some logic error in the bgsend socket acquisition
code. In lib/Net/DNS/Resolver/Base.pm line 1002 there is the line that
reads:
unless (scalar(@socket)) {
However, this will always evaluate to true, because earlier the
assignments will either populate the array with the socket or an undef
at the specified index. That it is, the size of the array will always
be greater than zero, thus that test's code block will never been run.
This isn't a critical problem, because it'll be caught later in the
foreach loop with the "!defined test", but things end up being reported
as a different type of error once than is intended.
Couple other minor comments. There is some extraneous comment and a
single quote character on line 1003. Just looks like something got
chopped off or forgotten. There is a typo in the error message in this
procedure, search for 'Unsoported'. Also, did you intend to support
persistent_udp in bgsend? It doesn't appear to be available. It might
be nice to either add that or make a note that it is not available in
the routine. Additionally it doesn't look like TCP is supported with
the bg routines, perhaps something else to make note of.