Skip to content

Commit

Permalink
remove special case of Net::DNS::VERSION == 1.03
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Karasik committed Jan 6, 2016
1 parent b3d426d commit 420b9cb
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions lib/IO/Lambda/DNS.pm
Expand Up @@ -51,19 +51,7 @@ lambda {
my $bg_obj = $obj-> bgsend( @ctx);
return "send error: " . $obj-> errorstring unless $bg_obj;

my $sock;
if ( $Net::DNS::VERSION == 1.03 ) {
# this is a IO::Select object
my @handles = $bg_obj->handles;
if ( 1 != @handles ) {
warn "There's something wrong with Net::DNS version $Net::DNS::VERSION, please notify the author\n";
return "panic: Net::DNS returned not 1 socket\n";
}
$sock = $handles[0]->[0];
} else {
$sock = $bg_obj;
}

my $sock = $bg_obj;
context $sock, $timeout;
readable {
unless ( shift) {
Expand Down

0 comments on commit 420b9cb

Please sign in to comment.