This error is caused by a bug in the Net::HTTP module.
It’s one of the more common errors in Perl and, as such, easy to overlook.
You know, it seems to be the case that many of the errors we’re getting from NetHTTP are the result of this particular bug. We’re going to fix it, and the fix is going into CPAN.
So… here is your fix. NetHTTP isn’t the problem. The problem is that Net::Error is trying to resolve a name that isn’t yet defined. This is one of the few places where you have to explicitly define your own error handler.
The NetError code is used to indicate that a HTTP error has occurred and the client is now trying to figure out how to address the problem. Here you have to use the NetError::err_name() function, which returns the name of the HTTP error.
the name of the error message might be of interest. Its the same as the one returned by NetError. When defined, NetError_name returns the name of the error, but in reality this function only returns the one you defined. The name NetError_name returned from NetError is just NetError.name.
It is possible to define NetError_name to return the real name of the error, but it’s better to use NetError_name instead.
NetError_name returns the real name of the error returned by this function. This is what you need to use when you see something like, “error: net::err_name_not_resolved” in the web.
Yeah, it’s just plain bad.
The real problem with NetError_name is that it returns the full name of the error, which makes it easier to track down, but also makes it easy to mistake for the actual error. In other words, net::err_name_not_resolved is not the same as NetError_name.