Perl Makes Testing Easy Perl Testing #30

Querying with SOAP

use Test::More 'no_plan';
use SOAP::Lite +autodispatch =>
  uri => 'http://specs/Sensors';

my @hosts = ...
foreach my $host (@hosts) {
    my $t = Sensors->new($host)->getTemp;
    ok($t < 95, "temp from $host");
    diag("temp was $t");
}
Copyright © 2006 Ian Langworth