From 053554b01114a1ee83f31bab7e16f0a960c0f31e Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 28 Sep 2012 21:18:17 -0500 Subject: stop using method calling on filehandles can't seem to figure out how to make this work on perls below 5.12 --- lib/Web/Request.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Web/Request.pm b/lib/Web/Request.pm index 9d5e944..db86275 100644 --- a/lib/Web/Request.pm +++ b/lib/Web/Request.pm @@ -201,13 +201,13 @@ has _parsed_body => ( my $input = $self->_input; if ($self->env->{'psgix.input.buffered'}) { - $input->seek(0, 0); + seek $input, 0, 0; } my $content = ''; my $spin = 0; while ($cl) { - $input->read(my $chunk, $cl < 8192 ? $cl : 8192); + read $input, my $chunk, $cl < 8192 ? $cl : 8192; my $read = length($chunk); $cl -= $read; $body->add($chunk); @@ -219,7 +219,7 @@ has _parsed_body => ( } if ($self->env->{'psgix.input.buffered'}) { - $input->seek(0, 0); + seek $input, 0, 0; } else { open my $fh, '<', \$content; -- cgit v1.2.3