Sophie

Sophie

distrib > * > cooker > x86_64 > by-pkgid > 3f070fffbf27156852f88d0547d8fff0 > files > 138

perl-SOAP-Lite-0.712.0-2.noarch.rpm

#!/usr/bin/perl -w


# -- 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";