HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/share/perl5/Stream/Buffered/File.pm
package Stream::Buffered::File;
use strict;
use warnings;
use base 'Stream::Buffered';

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;