in reply to Net::Ping 2.63 Failing

Could it be that 192.168.10.991 is not a valid TCPIP4 address

Replies are listed 'Best First'.
Re^2: Net::Ping 2.63 Failing
by g_speran (Scribe) on Jan 17, 2018 at 03:50 UTC
    works in one version, just not in the other. Also fails on an ip address of 10.240.220.331 in version 2.63 but works in version 2.43 for the same IP address. Should it be trying to actually validate an IP address or just ping it?
      Should it be trying to actually validate an IP address or just ping it?

      By my reading of the Net::Ping::ping() documentation, it should just ping it.

      That documentation says, in part:

      <quote>
      If the hostname cannot be found or there is a problem with the IP number, the success flag returned will be undef. Otherwise, the success flag will be 1 if the host is reachable and 0 if it is not. For most practical purposes, undef and 0 and can be treated as the same case.
      </quote>

      So, if the ping() function is dying, then it's not behaving as advertised - which makes it a bug.

      Cheers,
      Rob

        Agreed, any this is the point that I was trying to make. With that said, whom should I open a bug report with? I have never filed a bug report

      Please explain how can you ping an invalid address? What would you fill into the 32bits of the "Destination IP address"? How do you change the ascii 991 or 331 into a 8bit binary number?

        I don't disagree with that. But is it the functionality of the module to check if the IP is in a valid rage, or it it the function of Net::Ping, to "ping" or attempt to ping, the ip address supplied? Again, at least in 2.43 version, the Net::Ping did not completely exit the running perl script. In the 2.61 & 2.63 versions, the script errors out and stops any further execution

        I don't disagree with that. But is it the functionality of the module to check if the IP is in a valid rage, or it it the function of Net::Ping, to "ping" or attempt to ping, the ip address supplied? Again, at least in 2.43 version, the Net::Ping did not completely exit the running perl script. In the 2.61 & 2.63 versions, the script errors out and stops any further execution