services: services/perl/lib/AppSwitch/Echo Client.pm Service.pm
Status: Pre-Alpha
Brought to you by:
jgsmith
From: <app...@li...> - 2001-07-29 18:27:13
|
jgsmith 01/07/29 11:27:13 Modified: perl/lib/AppSwitch/Echo Client.pm Service.pm Log: Reflect updated Echo spec Revision Changes Path 1.4 +5 -7 services/perl/lib/AppSwitch/Echo/Client.pm Index: Client.pm =================================================================== RCS file: /cvsroot/appswitch/services/perl/lib/AppSwitch/Echo/Client.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -b -u -r1.3 -r1.4 --- Client.pm 2001/07/29 05:12:31 1.3 +++ Client.pm 2001/07/29 18:27:13 1.4 @@ -11,9 +11,9 @@ } sub echo { - my($self, $string) = object_or_default(@_); + my($self, %args) = object_or_default(@_); - return $self -> request("echo", content => $string); + return $self -> request("echo", %args); } 1; @@ -28,10 +28,8 @@ use AppSwitch::Echo::Client; -my $client = new AppSwitch::Echo::Client; +print echo(content => 'Hello, World!') -> {content}; -print $client -> echo('Hello, World!'); - =head1 DESCRIPTION The echo client and server provide a simple example of a service @@ -42,9 +40,9 @@ =over 4 -=item echo(string) +=item echo(hash) -Uses an echo service to return the string sent to the service. +Uses an echo service to return the hash sent to the service. This can be useful for testing connections or making sure the daemon is up and running. 1.5 +1 -1 services/perl/lib/AppSwitch/Echo/Service.pm Index: Service.pm =================================================================== RCS file: /cvsroot/appswitch/services/perl/lib/AppSwitch/Echo/Service.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -b -u -r1.4 -r1.5 --- Service.pm 2001/07/29 05:12:31 1.4 +++ Service.pm 2001/07/29 18:27:13 1.5 @@ -5,7 +5,7 @@ our $VERSION = 0.01; -sub do_echo : Method(echo) { $_[2] -> {content} } +sub do_echo : Method(echo) { $_[2] } 1; |