File: states-client.pl

package info (click to toggle)
libfrontier-rpc-perl 0.07b4-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 152 kB
  • ctags: 73
  • sloc: perl: 785; sh: 82; xml: 49; makefile: 41
file content (38 lines) | stat: -rw-r--r-- 871 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#
# Copyright (C) 1999 Ken MacLeod
# See the file COPYING for distribution terms.
#
# $Id: states-client.pl,v 1.1 1999/01/19 19:14:41 kmacleod Exp $
#

require 'dumpvar.pl';		# used to dump results

use Frontier::Client;

$url = 'http://betty.userland.com/RPC2';

# this client will accept a URL on the command line if it's given
if ($#ARGV > -1) {
    $url = $ARGV[0];
}

$server = Frontier::Client->new( url => $url );

printf "Calling examples.getStateName\n";
$result = $server->call('examples.getStateName', 41);

dumpvar ('main', 'result');


printf "Calling examples.getStateList\n";
$result = $server->call('examples.getStateList',
			[12, 28, 33, 39, 46]);

dumpvar ('main', 'result');


printf "Calling examples.getStateStruct\n";
$result = $server->call('examples.getStateStruct',
			{ state1 => 18, state2 => 27, state3 => 48 });

dumpvar ('main', 'result');