On Sat, May 9, 2009 at 7:14 AM, Lars Dɪᴇᴄᴋᴏᴡ <[email protected]> wrote: > David Golden ✍: >> My opinion is that tests that need the >> internet should check for it and skip if it isn't available. > What is the recommended practice for that? Do you have a snippet that > works on platforms that are reasonably linuxish?
I haven't done it personally, so I don't know. It would be a great thing to post as a best practices on the perl wiki, if it's not there already. I would think it would be along the lines of checking DNS for a known server that is likely to be up (e.g. google.com or yahoo.com) and test making a socket connection to port 80. If either DNS or connection fails, then give up. -- David
