Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (25 sloc) 0.45 kB
package Plack::TempBuffer::File;
use strict;
use parent 'Plack::TempBuffer';
use IO::File;
sub new {
my $class = shift;
my $fh = IO::File->new_tmpfile;
$fh->binmode;
bless { fh => $fh }, $class;
}
sub print {
my $self = shift;
$self->{fh}->print(@_);
}
sub size {
my $self = shift;
$self->{fh}->flush;
-s $self->{fh};
}
sub rewind {
my $self = shift;
$self->{fh}->seek(0, 0);
$self->{fh};
}
1;
Jump to Line
Something went wrong with that request. Please try again.