Index: trunk/t/client-yaml.t
===================================================================
--- trunk/t/client-yaml.t (revision 3588)
+++ trunk/t/client-yaml.t (revision 3589)
@@ -7,7 +7,7 @@
require "t/lib.pl";
-my $numTests = 10;
+my $numTests = 11;
my $numTest = 0;
Index: trunk/t/client.t
===================================================================
--- trunk/t/client.t (revision 3588)
+++ trunk/t/client.t (revision 3589)
@@ -7,7 +7,7 @@
require "t/lib.pl";
-my $numTests = 10;
+my $numTests = 11;
my $numTest = 0;
Index: trunk/t/lib.pl
===================================================================
--- trunk/t/lib.pl (revision 3588)
+++ trunk/t/lib.pl (revision 3589)
@@ -55,6 +55,11 @@
$result = eval { $calculator->divide(27, 0) };
Test($@ and $@ =~ /zero/);
+ my $expect = join(q{}, 'a'..'daaa');
+ $result = eval { $calculator->huge_result };
+ Test($result and $result eq $expect)
+ or print "huge result failed: $@\n";
+
($client, $calculator);
}
Index: trunk/t/crypt.t
===================================================================
--- trunk/t/crypt.t (revision 3588)
+++ trunk/t/crypt.t (revision 3589)
@@ -13,7 +13,7 @@
require "t/lib.pl";
-my $numTests = 18;
+my $numTests = 20;
my $numTest = 0;
my $hostkey = 'b3a6d83ef3187ac4';
Index: trunk/t/methods.t
===================================================================
--- trunk/t/methods.t (revision 3588)
+++ trunk/t/methods.t (revision 3589)
@@ -7,7 +7,7 @@
require "t/lib.pl";
-my $numTests = 11;
+my $numTests = 12;
my $numTest = 0;
@@ -27,7 +27,8 @@
'add' => 1,
'multiply' => 1,
'divide' => 1,
- 'subtract' => 1
+ 'subtract' => 1,
+ 'huge_result' => 1,
}
} }
]
Index: trunk/t/server
===================================================================
--- trunk/t/server (revision 3588)
+++ trunk/t/server (revision 3589)
@@ -58,7 +58,13 @@
$result / $divisor;
}
+sub huge_result {
+ my $self = shift;
+ join(q{}, 'a'..'daaa');
+}
+
+
package CalcServer;
use vars qw($VERSION @ISA);
Index: trunk/t/base.t
===================================================================
--- trunk/t/base.t (revision 3588)
+++ trunk/t/base.t (revision 3589)
@@ -2,7 +2,7 @@
use strict;
print "1..6\n";
-my $ok = require RPC::PlServer::Comm;
+my $ok = require RPC::PlComm::Base;
printf("%sok 1\n", ($ok ? "" : "not "));
$ok = require RPC::PlServer;
printf("%sok 2\n", ($ok ? "" : "not "));
Index: trunk/t/compress.t
===================================================================
--- trunk/t/compress.t (revision 3588)
+++ trunk/t/compress.t (revision 3589)
@@ -13,7 +13,7 @@
require "t/lib.pl";
-my $numTests = 18;
+my $numTests = 20;
my $numTest = 0;
# Create a configfile with compression
Index: trunk/lib/RPC/PlComm/Base.pm
===================================================================
--- trunk/lib/RPC/PlComm/Base.pm (revision 3588)
+++ trunk/lib/RPC/PlComm/Base.pm (revision 3589)
@@ -57,8 +57,9 @@
if (my $cipher = $attr->{'cipher'}) {
$self->{'cipher'} = $cipher;
}
- if (my $maxmessage = $attr->{'maxmessage'}) {
- $self->{'maxmessage'} = $maxmessage;
+
+ if (defined $attr->{'maxmessage'}) {
+ $self->{'maxmessage'} = $attr->{'maxmessage'};
}
$self;