10 use YAML qw[LoadFile];
12 my $test = shift(@ARGV) || 1;
14 my $headers = LoadFile( sprintf( "t/data/multipart/%.3d-headers.yml", $test ) );
15 my $content = IO::File->new( sprintf( "t/data/multipart/%.3d-content.dat", $test ), O_RDONLY );
16 my $body = HTTP::Body->new( $headers->{'Content-Type'}, $headers->{'Content-Length'} );
20 while ( $content->read( my $buffer, 1024 ) ) {
24 warn Dumper( $body->param );
25 warn Dumper( $body->upload );
26 warn Dumper( $body->body );
28 warn "length : " . $body->length;
29 warn "content length : " . $body->content_length;
30 warn "state : " . $body->{state};
31 warn "buffer : " . $body->buffer;