Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > 1ae5cb58e1365c927d51e61ff8ac47fb > files > 150

perl-SOAP-Lite-0.710.10-1.fc13.noarch.rpm

#!perl -w
#!d:\perl\bin\perl.exe 

# -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko --

use strict;
use SOAP::Lite;
use Text::Wrap;

my $res = SOAP::Lite
  -> uri('urn:vgx-joke')
  -> proxy('http://services.xmltoday.com/vx_engine/soap-trigger.pperl')
  -> JokeOfTheDay
;

die $res->faultstring if $res->fault;

printf "%s [%s]\n", $res->result->{title}, $res->result->{score};
print wrap("\t", '', split( /\n/, $res->result->{text})), "\n";