[Opensrf-commits] r2057 - trunk/src/perl/lib/OpenSRF/Application/Demo (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Nov 8 20:57:40 EST 2010
Author: dbs
Date: 2010-11-08 20:57:38 -0500 (Mon, 08 Nov 2010)
New Revision: 2057
Modified:
trunk/src/perl/lib/OpenSRF/Application/Demo/SimpleText.pm
Log:
Add a streaming version of the split() method in simpletext example
Modified: trunk/src/perl/lib/OpenSRF/Application/Demo/SimpleText.pm
===================================================================
--- trunk/src/perl/lib/OpenSRF/Application/Demo/SimpleText.pm 2010-11-08 21:03:55 UTC (rev 2056)
+++ trunk/src/perl/lib/OpenSRF/Application/Demo/SimpleText.pm 2010-11-09 01:57:38 UTC (rev 2057)
@@ -140,7 +140,9 @@
my $delimiter = shift || ' ';
my @split_text = split $delimiter, $text;
- return \@split_text;
+ foreach my $string (@split_text) {
+ $conn->respond( $string );
+ }
return undef;
}
@@ -150,6 +152,7 @@
api_name => 'opensrf.simple-text.split',
api_level => 1,
argc => 2,
+ stream => 1,
signature => {
desc => <<" DESC",
Splits a string by a given delimiter (space by default) and returns an array of the split strings
More information about the opensrf-commits
mailing list