NAME

PrimClient - a helper module for Prim.pm

SYNOPSIS

my $back_end = PrimClient->new($host, $port);
my @response = $back_end->call("method_name", "arg1", "arg2");

print "@response\n";

DESCRIPTION

This is an internal object oriented module whose sole purpose is to make it easier to write Prim.pm. This module provides that actual socket reads and writes for Prim.pm. It must know the host and port to begin the connection. It invokes remote methods through its call methods which is not an ideal user API.

In summary, this class does the heavy lifting. But it is really most useful as a helper. If you want to reimplement it, you might be better off to go directly to the protocols file in the distribution.

EXPORT

None.

AUTHOR

Phil Crow, philcrow2000@yahoo.com

new

This constructor merely stores the host and port information it receives in a hash, and returns a blessed reference to it.

call

Initiates a connection to the server specified in the constructor. Sends a properly formatted xml request for that server to run the method passed as the first argument by the caller with the remaining arguments passed through the server's function.

Takes a method name and a list of arguments to that method.

Returns a list of the return values produced by the server.

Handles all xml details.

This routine should have a timeout.