9 use lib "$FindBin::Bin/../lib";
11 use Benchmark qw[timethese];
13 use IO::File qw[O_RDONLY];
14 use YAML qw[LoadFile Dump];
16 my $headers = LoadFile("t/data/multipart/003-headers.yml");
20 my $content = IO::File->new( "$FindBin::Bin/../t/data/multipart/003-content.dat", O_RDONLY );
21 my $body = HTTP::Body->new( $headers->{'Content-Type'}, $headers->{'Content-Length'} );
25 while ( $content->sysread( my $buffer, $bsize ) ) {
29 unless ( $body->state eq 'done' ) {
36 'HTTP::Body 256' => sub { $run->(256) },
37 'HTTP::Body 1024' => sub { $run->(1024) },
38 'HTTP::Body 4096' => sub { $run->(4096) },
39 'HTTP::Body 8192' => sub { $run->(8192) },