9 use lib "$FindBin::Bin/../lib";
10 use lib "$FindBin::Bin/../t/lib";
12 use Benchmark qw[timethese];
14 use IO::File qw[O_RDONLY];
15 use PAML qw[LoadFile];
17 my $headers = LoadFile("t/data/multipart/003-headers.pml");
21 my $content = IO::File->new( "$FindBin::Bin/../t/data/multipart/003-content.dat", O_RDONLY );
22 my $body = HTTP::Body->new( $headers->{'Content-Type'}, $headers->{'Content-Length'} );
26 while ( $content->sysread( my $buffer, $bsize ) ) {
30 unless ( $body->state eq 'done' ) {
37 'HTTP::Body 256' => sub { $run->(256) },
38 'HTTP::Body 1024' => sub { $run->(1024) },
39 'HTTP::Body 4096' => sub { $run->(4096) },
40 'HTTP::Body 8192' => sub { $run->(8192) },