Spec URL: http://ppisar.fedorapeople.org/perl-HTTP-Parser/perl-HTTP-Parser.spec SRPM URL: http://ppisar.fedorapeople.org/perl-HTTP-Parser/perl-HTTP-Parser-0.04-1.fc13.src.rpm Description: This is an HTTP request parser. It takes chunks of text as received and returns a 'hint' as to what is required, or returns the HTTP::Request when a complete request has been read. HTTP/1.1 chunking is supported. It dies if it finds an error. Notice to reviewer regarding spelling: rpmlint does not know `chunking', despite it's regular English word. This spec file builds on F14--12.
Source matches. License matches. Builds in mock. No crazy provides or requires. rpmlint silent other than the spelling thing mentioned. No missing docs. Owns what it should. Note: Please drop these explicit requires. Requires: perl(HTTP::Request) Requires: perl(HTTP::Response) Requires: perl(URI) The automatic perl dep generator takes care of them. APPROVED
On Fedora 13 with Perl 5.10.1, the example in the README file emits error: 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. Can you please check?
Thanks for report. Just replace the `while' with `foreach'. https://rt.cpan.org/Public/Bug/Display.html?id=58404
New Package CVS Request ======================= Package Name: perl-HTTP-Parser Short Description: Parse HTTP/1.1 request into HTTP::Request/Response object Owners: ppisar mmaslano psabata Branches: F-12 F-13 InitialCC: perl-sig
I get the following output, after changing 'while' with 'foreach': $ perl foo.pl passing 'GET / HTTP/1.1' got '-2' passing 'Host: localhost' got '-2' passing 'Connection: close' got '-2' passing '' got '0' passing '' got '-2' Can't call method "as_string" without a package or object reference at foo.pl line 15. Anything is required to be included for "as_string" to function? Can you please update the README with the changes?
Ok, the full working example is: 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(); There was missing `object' method call. Run `perldoc HTTP::Parser' for more details. The example seems be written from scratch without testing. I will correct it in distribution package not to mislead Fedora users.
@Petr: That worked! Thanks for your prompt response!
cvs done
Thank you for review and CVS update. Package built for F14--12.
perl-HTTP-Parser-0.05-1.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
Package Change Request ====================== Package Name: perl-HTTP-Parser New Branches: el6 Owners: averi psabata InitialCC: perl-sig
Git done (by process-git-requests).