-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Net::Ping croaks on DNS no-record #17
Comments
error output_ |
Are you sure you want a different error result object, when |
The problem is not ping returning undef, I'm fine with this. The problem is ping doing croak, which terminates the perl interpreter and thus the application dies instead continuing to the if/else statement. |
Oh, that's a big problem, agreed |
I've added a new test for this problem. The warning is fair, since ping expects a IP and checks a route to the host. If the error is elsewhere, like in the resolver, this error is unexpected and thus warns. We cannot just silently ignore a resolver failure. We should only silently return undef when the route is off, but not when the DNS is off. Can you check again where it croaks? |
I've been using Net::Ping 2.43 with the following code:
Though, $host sometimes contains a non-resolvable hostname. With Net::Ping 2.43, this resulted in the else branch being taking. Now the application exists, which is not what I need. Additionally, this is not documented - crashing the application if a dns name does not resolve.
This therefore should be disableable.
The text was updated successfully, but these errors were encountered: