summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-09-28 21:18:17 -0500
committerJesse Luehrs <doy@tozt.net>2012-09-28 21:18:17 -0500
commit053554b01114a1ee83f31bab7e16f0a960c0f31e (patch)
tree12afead344c1f0fdbdb4e99bbd8a8d2d529ac75a /lib
parentc69dba1160e668c90de12e744962db422e30429d (diff)
downloadweb-request-053554b01114a1ee83f31bab7e16f0a960c0f31e.tar.gz
web-request-053554b01114a1ee83f31bab7e16f0a960c0f31e.zip
stop using method calling on filehandles
can't seem to figure out how to make this work on perls below 5.12
Diffstat (limited to 'lib')
-rw-r--r--lib/Web/Request.pm6
1 files 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;