Thanks. I'll give that a try.

On Nov 19, 2012, at 10:34 AM, Michiel Beijen wrote:

> Hi JT,
> 
> On Mon, Nov 19, 2012 at 5:27 PM, JT Smith <j...@plainblack.com> wrote:
>> Is there are best practice for testing whether or not the CPAN testers 
>> server has public internet access? I have a module that passes on a bunch of 
>> operating systems and Perl versions, and fails on others. The only thing I 
>> can think might be wrong would be that many of the tests rely on access to a 
>> web service, and maybe that web service isn't allowed to be called from 
>> those boxes.
> 
> What module do you use to connect to the web service?
> LWP has $ua->is_online
> 
> but it might be the best is to call the web service URL and if you get
> back anything else then HTTP 200 to skip the test, preferably with the
> HTTP result in the message. This way you have the tests not failing
> even if for instance web access is not allowed or there is no proxy
> configured.
> --
> Michiel

Reply via email to