Skip Menu |

This queue is for tickets about the HTTP-Parser CPAN distribution.

Report information
The Basics
Id: 58404
Status: resolved
Priority: 0/
Queue: HTTP-Parser

People
Owner: david [...] edeca.net
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.04
Fixed in: 0.05



Subject: Syntax error in README
The code quoted in README does not compile: syntax error at /tmp/foo.pl line 9, near "while my " syntax error at /tmp/foo.pl line 12, near "}" Execution of /tmp/foo.pl aborted due to compilation errors. There should be foreach instead of while keyword.
From: ppisar [...] redhat.com
Actually the code is broken on last line too. This is working example: use HTTP::Parser; my $parser = HTTP::Parser->new(); my @lines = ('GET / HTTP/1.1','Host: localhost','Connection: close','',''); my $result; foreach my $line (@lines) { $result = $parser->add("$line\x0d\x0a"); print "passing '$line' got '$result'\n"; } print $parser->object->as_string();