r70879 - in /branches/upstream/libpoe-filter-http-parser-perl/current: ./ inc/ lib/POE/Filter/HTTP/ t/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Tue Mar 8 12:21:57 UTC 2011
Author: jawnsy-guest
Date: Tue Mar 8 12:21:44 2011
New Revision: 70879
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=70879
Log:
[svn-upgrade] new version libpoe-filter-http-parser-perl (1.06)
Added:
branches/upstream/libpoe-filter-http-parser-perl/current/META.json
branches/upstream/libpoe-filter-http-parser-perl/current/dist.ini
branches/upstream/libpoe-filter-http-parser-perl/current/t/00-compile.t
branches/upstream/libpoe-filter-http-parser-perl/current/t/release-pod-coverage.t
branches/upstream/libpoe-filter-http-parser-perl/current/t/release-pod-syntax.t
Removed:
branches/upstream/libpoe-filter-http-parser-perl/current/inc/
branches/upstream/libpoe-filter-http-parser-perl/current/t/00_compile.t
branches/upstream/libpoe-filter-http-parser-perl/current/t/99_pod.t
branches/upstream/libpoe-filter-http-parser-perl/current/t/99_pod_coverage.t
Modified:
branches/upstream/libpoe-filter-http-parser-perl/current/Changes
branches/upstream/libpoe-filter-http-parser-perl/current/LICENSE
branches/upstream/libpoe-filter-http-parser-perl/current/MANIFEST
branches/upstream/libpoe-filter-http-parser-perl/current/META.yml
branches/upstream/libpoe-filter-http-parser-perl/current/Makefile.PL
branches/upstream/libpoe-filter-http-parser-perl/current/README
branches/upstream/libpoe-filter-http-parser-perl/current/lib/POE/Filter/HTTP/Parser.pm
branches/upstream/libpoe-filter-http-parser-perl/current/t/01_filter_req.t
branches/upstream/libpoe-filter-http-parser-perl/current/t/02_in_use.t
Modified: branches/upstream/libpoe-filter-http-parser-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-filter-http-parser-perl/current/Changes?rev=70879&op=diff
==============================================================================
--- branches/upstream/libpoe-filter-http-parser-perl/current/Changes (original)
+++ branches/upstream/libpoe-filter-http-parser-perl/current/Changes Tue Mar 8 12:21:44 2011
@@ -1,31 +1,64 @@
-Changelog for POE::Filter::HTTP::Parser
-=======================================
+==============================
+2011-03-07 23:46:11 +0000 1.06
+==============================
-1.04 Wed Jul 28 12:59:47 BST 2010
- - Apply a patch from Dariusz Jackowski [RT#59772] which fixes
- double encoded utf-8 strings.
+ commit b19d16ab7884681490695ac7e06145c8e609a293
+ Author: Chris 'BinGOs' Williams <chris at bingosnet.co.uk>
+ Date: Mon Mar 7 23:46:11 2011 +0000
+
+ Fix trailing space and bump version to 1.06
-1.02 Wed Jun 17 16:19:05 BST 2009
- - Fixed small bug in get_pending()
+ commit dd95ee1ab0da0d89e8a18e39e9b4cbebabdd4f44
+ Author: Paul Driver <frodwith at gmail.com>
+ Date: Mon Mar 7 10:54:55 2011 -0600
+
+ Depending on latest HTTP::Parser and fixing some tests
-1.00 Mon May 11 22:59:58 BST 2009
- - Added auto_license and githubmeta to Makefile.PL
- - Bumped to a stable version
+ commit a3fbde85a4c52b1f9265b355a40214d4ba69b9d7
+ Author: Chris 'BinGOs' Williams <chris at bingosnet.co.uk>
+ Date: Mon Mar 7 21:46:59 2011 +0000
+
+ Update dist.ini with 'Prereqs' option rather than 'Prereq'
-0.08 Thu Jan 29 14:29:53 GMT 2009
- - Small bug in 'get_one', we should check that $string
- actually has something in it before passing to HTTP::Parser.
+ commit 0337189987690f84435961ee29e0082a6216accf
+ Author: Chris 'BinGOs' Williams <chris at bingosnet.co.uk>
+ Date: Wed Jul 28 13:13:58 2010 +0100
+
+ Removed the unnecessary tests
-0.06 Tue Jan 27 10:38:34 GMT 2009
- - POD fixes. Inconsistent referral to the 'type'
+ commit ae9689f9b53ecfdc6db670daba7db58b72c30126
+ Author: Chris 'BinGOs' Williams <chris at bingosnet.co.uk>
+ Date: Wed Jul 28 13:06:43 2010 +0100
+
+ Convert distribution to Dist::Zilla
-0.04 Fri Jan 23 12:18:06 GMT 2009
- - Improved the documentation
- - Clarified type to 'server' or 'client'
- - Generate a HTTP::Response error on bad request in 'server' mode.
- much like POE::Filter::HTTPD does.
- - Additional tests, added Test::POE::(Client|Server)::TCP as
- build_requires
+==============================
+2010-07-28 13:00:14 +0100 1.04
+==============================
-0.02 Thu Jan 22 16:29:49 GMT 2009
- - Initial CPAN Release
+ commit 73125ea7b37e467d3ee3c9484aa74b6a9df8f159
+ Author: Chris 'BinGOs' Williams <chris at bingosnet.co.uk>
+ Date: Wed Jul 28 13:00:14 2010 +0100
+
+ Bump version and update Changes
+
+ commit 2569462538d5782d38d86cafb114247eacef2224
+ Author: Chris 'BinGOs' Williams <chris at bingosnet.co.uk>
+ Date: Wed Jul 28 12:58:15 2010 +0100
+
+ Apply a patch from Dariusz Jackowski [RT#59772] which fixes double
+ encoded utf-8 strings.
+
+==============================
+2009-06-17 16:20:07 +0100 1.02
+==============================
+
+ commit 0fc4b1a7df9292444132814e3f02fafb271ec418
+ Author: Chris Williams <chris at bingosnet.co.uk>
+ Date: Wed Jun 17 16:20:07 2009 +0100
+
+ Fixed small bug in get_pending()
+
+====================================
+End of changes in the last 1825 days
+====================================
Modified: branches/upstream/libpoe-filter-http-parser-perl/current/LICENSE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-filter-http-parser-perl/current/LICENSE?rev=70879&op=diff
==============================================================================
--- branches/upstream/libpoe-filter-http-parser-perl/current/LICENSE (original)
+++ branches/upstream/libpoe-filter-http-parser-perl/current/LICENSE Tue Mar 8 12:21:44 2011
@@ -1,4 +1,4 @@
-This software is copyright (c) 2010 by Chris Williams.
+This software is copyright (c) 2011 by Chris Williams, Artur Bergman and Rocco Caputo.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@
--- The GNU General Public License, Version 1, February 1989 ---
-This software is Copyright (c) 2010 by Chris Williams.
+This software is Copyright (c) 2011 by Chris Williams, Artur Bergman and Rocco Caputo.
This is free software, licensed under:
@@ -270,7 +270,7 @@
--- The Artistic License 1.0 ---
-This software is Copyright (c) 2010 by Chris Williams.
+This software is Copyright (c) 2011 by Chris Williams, Artur Bergman and Rocco Caputo.
This is free software, licensed under:
Modified: branches/upstream/libpoe-filter-http-parser-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-filter-http-parser-perl/current/MANIFEST?rev=70879&op=diff
==============================================================================
--- branches/upstream/libpoe-filter-http-parser-perl/current/MANIFEST (original)
+++ branches/upstream/libpoe-filter-http-parser-perl/current/MANIFEST Tue Mar 8 12:21:44 2011
@@ -1,26 +1,18 @@
Changes
+LICENSE
+MANIFEST
+META.json
+META.yml
+Makefile.PL
+README
+dist.ini
examples/simpleclient.pl
-inc/Module/Install.pm
-inc/Module/Install/AutoLicense.pm
-inc/Module/Install/Base.pm
-inc/Module/Install/Can.pm
-inc/Module/Install/Fetch.pm
-inc/Module/Install/GithubMeta.pm
-inc/Module/Install/Makefile.pm
-inc/Module/Install/Metadata.pm
-inc/Module/Install/Win32.pm
-inc/Module/Install/WriteAll.pm
lib/POE/Filter/HTTP/Parser.pm
-LICENSE
-Makefile.PL
-MANIFEST This list of files
-META.yml
-README
-t/00_compile.t
+t/00-compile.t
t/01_filter_req.t
t/01_filter_resp.t
t/01_get_pending.t
t/02_in_use.t
t/03_bad_request.t
-t/99_pod.t
-t/99_pod_coverage.t
+t/release-pod-coverage.t
+t/release-pod-syntax.t
Added: branches/upstream/libpoe-filter-http-parser-perl/current/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-filter-http-parser-perl/current/META.json?rev=70879&op=file
==============================================================================
--- branches/upstream/libpoe-filter-http-parser-perl/current/META.json (added)
+++ branches/upstream/libpoe-filter-http-parser-perl/current/META.json Tue Mar 8 12:21:44 2011
@@ -1,0 +1,53 @@
+{
+ "abstract" : "A HTTP POE filter for HTTP clients or servers",
+ "author" : [
+ "Chris Williams <chris at bingosnet.co.uk>"
+ ],
+ "dynamic_config" : 0,
+ "generated_by" : "Dist::Zilla version 4.200004, CPAN::Meta::Converter version 2.110580",
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "POE-Filter-HTTP-Parser",
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "6.42",
+ "Test::More" : "0.47",
+ "Test::POE::Client::TCP" : "0.1",
+ "Test::POE::Server::TCP" : "0.16"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "6.31"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Encode" : 0,
+ "HTTP::Parser" : "0.06",
+ "HTTP::Request" : 0,
+ "HTTP::Response" : 0,
+ "HTTP::Status" : 0,
+ "POE" : "1.003",
+ "perl" : "v5.6.0"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "homepage" : "http://github.com/bingos/poe-filter-http-parser/tree",
+ "repository" : {
+ "type" : "git",
+ "url" : "git://github.com/bingos/poe-filter-http-parser.git",
+ "web" : "http://github.com/bingos/poe-filter-http-parser/tree"
+ }
+ },
+ "version" : "1.06"
+}
+
Modified: branches/upstream/libpoe-filter-http-parser-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-filter-http-parser-perl/current/META.yml?rev=70879&op=diff
==============================================================================
--- branches/upstream/libpoe-filter-http-parser-perl/current/META.yml (original)
+++ branches/upstream/libpoe-filter-http-parser-perl/current/META.yml Tue Mar 8 12:21:44 2011
@@ -8,33 +8,23 @@
Test::POE::Client::TCP: 0.1
Test::POE::Server::TCP: 0.16
configure_requires:
- ExtUtils::MakeMaker: 6.42
-distribution_type: module
-generated_by: 'Module::Install version 0.99'
+ ExtUtils::MakeMaker: 6.31
+dynamic_config: 0
+generated_by: 'Dist::Zilla version 4.200004, CPAN::Meta::Converter version 2.110580'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: POE-Filter-HTTP-Parser
-no_index:
- directory:
- - examples
- - inc
- - t
-provides:
- POE::Filter::HTTP::Parser:
- file: lib/POE/Filter/HTTP/Parser.pm
- version: 1.04
requires:
Encode: 0
- HTTP::Parser: 0.04
+ HTTP::Parser: 0.06
HTTP::Request: 0
HTTP::Response: 0
HTTP::Status: 0
POE: 1.003
- perl: 5.6.0
+ perl: v5.6.0
resources:
homepage: http://github.com/bingos/poe-filter-http-parser/tree
- license: http://dev.perl.org/licenses/
repository: git://github.com/bingos/poe-filter-http-parser.git
-version: 1.04
+version: 1.06
Modified: branches/upstream/libpoe-filter-http-parser-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-filter-http-parser-perl/current/Makefile.PL?rev=70879&op=diff
==============================================================================
--- branches/upstream/libpoe-filter-http-parser-perl/current/Makefile.PL (original)
+++ branches/upstream/libpoe-filter-http-parser-perl/current/Makefile.PL Tue Mar 8 12:21:44 2011
@@ -1,21 +1,61 @@
+
use strict;
-use inc::Module::Install;
-name 'POE-Filter-HTTP-Parser';
-author 'Chris Williams <chris at bingosnet.co.uk>';
-version_from 'lib/POE/Filter/HTTP/Parser.pm';
-abstract_from 'lib/POE/Filter/HTTP/Parser.pm';
-license 'perl';
-auto_license holder => 'Chris Williams';
-perl_version '5.006';
-build_requires 'Test::More' => 0.47;
-build_requires 'Test::POE::Client::TCP' => 0.10;
-build_requires 'Test::POE::Server::TCP' => 0.16;
-requires 'Encode' => 0;
-requires 'POE' => 1.003;
-requires 'HTTP::Status' => 0;
-requires 'HTTP::Request' => 0;
-requires 'HTTP::Response' => 0;
-requires 'HTTP::Parser' => 0.04;
-auto_provides;
-githubmeta;
-WriteAll();
+use warnings;
+
+BEGIN { require v5.6.0; }
+
+use ExtUtils::MakeMaker 6.31;
+
+
+
+my %WriteMakefileArgs = (
+ 'ABSTRACT' => 'A HTTP POE filter for HTTP clients or servers',
+ 'AUTHOR' => 'Chris Williams <chris at bingosnet.co.uk>',
+ 'BUILD_REQUIRES' => {
+ 'ExtUtils::MakeMaker' => '6.42',
+ 'Test::More' => '0.47',
+ 'Test::POE::Client::TCP' => '0.1',
+ 'Test::POE::Server::TCP' => '0.16'
+ },
+ 'CONFIGURE_REQUIRES' => {
+ 'ExtUtils::MakeMaker' => '6.31'
+ },
+ 'DISTNAME' => 'POE-Filter-HTTP-Parser',
+ 'EXE_FILES' => [],
+ 'LICENSE' => 'perl',
+ 'NAME' => 'POE::Filter::HTTP::Parser',
+ 'PREREQ_PM' => {
+ 'Encode' => '0',
+ 'HTTP::Parser' => '0.06',
+ 'HTTP::Request' => '0',
+ 'HTTP::Response' => '0',
+ 'HTTP::Status' => '0',
+ 'POE' => '1.003'
+ },
+ 'VERSION' => '1.06',
+ 'test' => {
+ 'TESTS' => 't/*.t'
+ }
+);
+
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
+ my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
+ my $pp = $WriteMakefileArgs{PREREQ_PM};
+ for my $mod ( keys %$br ) {
+ if ( exists $pp->{$mod} ) {
+ $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
+ }
+ else {
+ $pp->{$mod} = $br->{$mod};
+ }
+ }
+}
+
+delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
+ unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
+
+WriteMakefile(%WriteMakefileArgs);
+
+
+
Modified: branches/upstream/libpoe-filter-http-parser-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-filter-http-parser-perl/current/README?rev=70879&op=diff
==============================================================================
--- branches/upstream/libpoe-filter-http-parser-perl/current/README (original)
+++ branches/upstream/libpoe-filter-http-parser-perl/current/README Tue Mar 8 12:21:44 2011
@@ -1,39 +1,61 @@
NAME
- POE::Filter::HTTP::Parser - A POE filter for HTTP based on HTTP::Parser
+ POE::Filter::HTTP::Parser - A HTTP POE filter for HTTP clients or
+ servers
+
+VERSION
+ version 1.06
SYNOPSIS
use POE::Filter::HTTP::Parser;
- my $request_filter = POE::Filter::HTTP::Parser->new( type => 'request' );
+ # For HTTP Servers
+
+ my $request_filter = POE::Filter::HTTP::Parser->new( type => 'server' );
my $arrayref_of_request_objects = $filter->get( [ $stream ] );
- my $response_filter = POE::Filter::HTTP::Parser->new( type => 'response' );
+ my $arrayref_of_HTTP_stream = $filter->put( $arrayref_of_response_objects );
+
+ # For HTTP clients
+
+ my $response_filter = POE::Filter::HTTP::Parser->new( type => 'client' );
+ my $arrayref_of_HTTP_stream = $filter->put( $arrayref_of_request_objects );
+
my $arrayref_of_response_objects = $filter->get( [ $stream ] );
DESCRIPTION
POE::Filter::HTTP::Parser is a POE::Filter for HTTP which is based on
HTTP::Parser.
- It will produce HTTP::Request or HTTP::Response objects from a stream of
- HTTP text, depending on the "type" that is specified during construction
- of the filter object.
+ It can be used to easily create POE based HTTP servers or clients.
+
+ With the "type" set to "client", which is the default behaviour, "get"
+ will parse HTTP::Response objects from HTTP streams and "put" will
+ accept HTTP::Request objects and convert them to HTTP streams.
+
+ With the "type" set to "server", the reverse will happen. "get" will
+ parse HTTP::Request objects from HTTP streams and "put" will accept
+ HTTP::Response objects and convert them to HTTP streams. Like
+ POE::Filter::HTTPD if there is an error parsing the HTTP request, this
+ filter will generate a HTTP::Response object instead, to encapsulate the
+ error message, suitable for simply sending back to the requesting
+ client.
CONSTRUCTOR
"new"
Creates a new POE::Filter::HTTP::Parser object. Takes one optional
- argument, whether to produce HTTP::Request objects, "request", or
- HTTP::Reponse objects, "response". "response" is the default
- behaviour if "type" is not specified.
+ argument, "type" which determines whether the filter will act in
+ "client" or "server" mode. "client" is the default if "type" is not
+ specified.
- 'type', set to either 'request' or 'response', default is 'response';
+ 'type', set to either 'client' or 'server', default is 'client';
METHODS
"get"
"get_one_start"
"get_one"
- Takes an arrayref which is contains lines of text. Returns an
- arrayref of either HTTP::Request or HTTP::Response objects depending
- on the "type" that has been specified.
+ Takes an arrayref which contains lines of text. Returns an arrayref
+ of either HTTP::Request or HTTP::Response objects depending on the
+ "type" that has been specified.
"get_pending"
Returns any data remaining in a filter's input buffer. The filter's
@@ -42,11 +64,11 @@
"put"
Takes an arrayref of either HTTP::Response objects or HTTP::Request
- objects depending on whether "type" is set to "request" or
- "response", respectively.
+ objects depending on whether "type" is set to "server" or "client",
+ respectively.
- If "type" is "response", then this accepts HTTP::Request objects. If
- "type" is "request", then this accepts HTTP::Response objects.
+ If "type" is "client", then this accepts HTTP::Request objects. If
+ "type" is "server", then this accepts HTTP::Response objects.
This does make sense if you think about it.
@@ -55,18 +77,10 @@
"clone"
Makes a copy of the filter, and clears the copy's buffer.
-AUTHOR
- Chris "BinGOs" Williams
-
- The "put" method for HTTP responses was borrowed from POE::Filter::HTTPD
- by Artur Bergman and Rocco Caputo.
-
-LICENSE
- Copyright © Chris Williams, Artur Bergman and Rocco Caputo.
-
- This module may be used, modified, and distributed under the same terms
- as Perl itself. Please see the license that came with your Perl
- distribution for details.
+CREDITS
+ The "put" method for HTTP responses was borrowed from
+ POE::Filter::HTTPD, along with the code to generate HTTP::Response on a
+ parse error, by Artur Bergman and Rocco Caputo.
SEE ALSO
POE::Filter
@@ -75,3 +89,13 @@
POE::Filter::HTTPD
+AUTHOR
+ Chris Williams <chris at bingosnet.co.uk>
+
+COPYRIGHT AND LICENSE
+ This software is copyright (c) 2011 by Chris Williams, Artur Bergman and
+ Rocco Caputo.
+
+ This is free software; you can redistribute it and/or modify it under
+ the same terms as the Perl 5 programming language system itself.
+
Added: branches/upstream/libpoe-filter-http-parser-perl/current/dist.ini
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-filter-http-parser-perl/current/dist.ini?rev=70879&op=file
==============================================================================
--- branches/upstream/libpoe-filter-http-parser-perl/current/dist.ini (added)
+++ branches/upstream/libpoe-filter-http-parser-perl/current/dist.ini Tue Mar 8 12:21:44 2011
@@ -1,0 +1,22 @@
+name = POE-Filter-HTTP-Parser
+version = 1.06
+author = Chris Williams <chris at bingosnet.co.uk>
+license = Perl_5
+copyright_holder = Chris Williams, Artur Bergman and Rocco Caputo
+
+[@BINGOS]
+
+[Prereqs / BuildRequires]
+ExtUtils::MakeMaker = 6.42
+Test::More = 0.47
+Test::POE::Client::TCP = 0.1
+Test::POE::Server::TCP = 0.16
+
+[Prereqs]
+Encode = 0
+HTTP::Parser = 0.06
+HTTP::Request = 0
+HTTP::Response = 0
+HTTP::Status = 0
+POE = 1.003
+perl = v5.6.0
Modified: branches/upstream/libpoe-filter-http-parser-perl/current/lib/POE/Filter/HTTP/Parser.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-filter-http-parser-perl/current/lib/POE/Filter/HTTP/Parser.pm?rev=70879&op=diff
==============================================================================
--- branches/upstream/libpoe-filter-http-parser-perl/current/lib/POE/Filter/HTTP/Parser.pm (original)
+++ branches/upstream/libpoe-filter-http-parser-perl/current/lib/POE/Filter/HTTP/Parser.pm Tue Mar 8 12:21:44 2011
@@ -1,14 +1,16 @@
package POE::Filter::HTTP::Parser;
+BEGIN {
+ $POE::Filter::HTTP::Parser::VERSION = '1.06';
+}
+
+# ABSTRACT: A HTTP POE filter for HTTP clients or servers
use strict;
use warnings;
use HTTP::Parser;
use HTTP::Status qw(status_message RC_BAD_REQUEST RC_OK RC_LENGTH_REQUIRED);
use base 'POE::Filter';
-use vars qw($VERSION);
use Encode qw[encode_utf8];
-
-$VERSION = '1.04';
my %type_map = (
'server', 'request',
@@ -37,7 +39,7 @@
sub get_one {
my $self = shift;
my $events = [];
-
+
my $string = shift @{ $self->{BUFFER} };
return [] unless $string;
@@ -200,11 +202,18 @@
}
'I filter therefore I am';
+
+
__END__
+=pod
=head1 NAME
POE::Filter::HTTP::Parser - A HTTP POE filter for HTTP clients or servers
+
+=head1 VERSION
+
+version 1.06
=head1 SYNOPSIS
@@ -223,7 +232,6 @@
my $arrayref_of_HTTP_stream = $filter->put( $arrayref_of_request_objects );
my $arrayref_of_response_objects = $filter->get( [ $stream ] );
-
=head1 DESCRIPTION
@@ -238,7 +246,7 @@
With the C<type> set to C<server>, the reverse will happen. C<get> will parse L<HTTP::Request>
objects from HTTP streams and C<put> will accept L<HTTP::Response> objects and convert them to
HTTP streams. Like L<POE::Filter::HTTPD> if there is an error parsing the HTTP request, this
-filter will generate a L<HTTP::Response> object instead, to encapsulate the error message,
+filter will generate a L<HTTP::Response> object instead, to encapsulate the error message,
suitable for simply sending back to the requesting client.
=head1 CONSTRUCTOR
@@ -265,7 +273,7 @@
=item C<get_one>
-Takes an arrayref which contains lines of text. Returns an arrayref of either
+Takes an arrayref which contains lines of text. Returns an arrayref of either
L<HTTP::Request> or L<HTTP::Response> objects depending on the C<type> that has been
specified.
@@ -292,20 +300,12 @@
=back
-=head1 AUTHOR
-
-Chris C<BinGOs> Williams
+=head1 CREDITS
The C<put> method for HTTP responses was borrowed from L<POE::Filter::HTTPD>,
along with the code to generate L<HTTP::Response> on a parse error,
by Artur Bergman and Rocco Caputo.
-=head1 LICENSE
-
-Copyright E<copy> Chris Williams, Artur Bergman and Rocco Caputo.
-
-This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details.
-
=head1 SEE ALSO
L<POE::Filter>
@@ -314,4 +314,16 @@
L<POE::Filter::HTTPD>
+=head1 AUTHOR
+
+Chris Williams <chris at bingosnet.co.uk>
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is copyright (c) 2011 by Chris Williams, Artur Bergman and Rocco Caputo.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
=cut
+
Added: branches/upstream/libpoe-filter-http-parser-perl/current/t/00-compile.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-filter-http-parser-perl/current/t/00-compile.t?rev=70879&op=file
==============================================================================
--- branches/upstream/libpoe-filter-http-parser-perl/current/t/00-compile.t (added)
+++ branches/upstream/libpoe-filter-http-parser-perl/current/t/00-compile.t Tue Mar 8 12:21:44 2011
@@ -1,0 +1,48 @@
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+
+
+use File::Find;
+use File::Temp qw{ tempdir };
+
+my @modules;
+find(
+ sub {
+ return if $File::Find::name !~ /\.pm\z/;
+ my $found = $File::Find::name;
+ $found =~ s{^lib/}{};
+ $found =~ s{[/\\]}{::}g;
+ $found =~ s/\.pm$//;
+ # nothing to skip
+ push @modules, $found;
+ },
+ 'lib',
+);
+
+my @scripts = glob "bin/*";
+
+my $plan = scalar(@modules) + scalar(@scripts);
+$plan ? (plan tests => $plan) : (plan skip_all => "no tests to run");
+
+{
+ # fake home for cpan-testers
+ # no fake requested ## local $ENV{HOME} = tempdir( CLEANUP => 1 );
+
+ like( qx{ $^X -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_ loaded ok" )
+ for sort @modules;
+
+ SKIP: {
+ eval "use Test::Script 1.05; 1;";
+ skip "Test::Script needed to test script compilation", scalar(@scripts) if $@;
+ foreach my $file ( @scripts ) {
+ my $script = $file;
+ $script =~ s!.*/!!;
+ script_compiles( $file, "$script script compiles" );
+ }
+ }
+}
Modified: branches/upstream/libpoe-filter-http-parser-perl/current/t/01_filter_req.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-filter-http-parser-perl/current/t/01_filter_req.t?rev=70879&op=diff
==============================================================================
--- branches/upstream/libpoe-filter-http-parser-perl/current/t/01_filter_req.t (original)
+++ branches/upstream/libpoe-filter-http-parser-perl/current/t/01_filter_req.t Tue Mar 8 12:21:44 2011
@@ -27,6 +27,6 @@
foreach my $req ( @$events ) {
isa_ok( $req, 'HTTP::Request' );
is( $req->method, 'GET', 'Request method was okay' );
- is( $req->uri->as_string, '/', 'The URI was okay' );
+ is( $req->uri->path, '/', 'The URI was okay' );
}
}
Modified: branches/upstream/libpoe-filter-http-parser-perl/current/t/02_in_use.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-filter-http-parser-perl/current/t/02_in_use.t?rev=70879&op=diff
==============================================================================
--- branches/upstream/libpoe-filter-http-parser-perl/current/t/02_in_use.t (original)
+++ branches/upstream/libpoe-filter-http-parser-perl/current/t/02_in_use.t Tue Mar 8 12:21:44 2011
@@ -73,7 +73,7 @@
my $test = delete $heap->{current_test};
isa_ok( $req, 'HTTP::Request' );
is( $req->method, 'GET', 'Request method is GET' );
- is( $req->uri->as_string, $test, 'Correct path' );
+ is( $req->uri->path, $test, 'Correct path' );
is( $req->header('X-HTTP-Version'), '1.1', 'X-HTTP-Version' );
diag($req->as_string);
my $resp = HTTP::Response->new( 200 );
Added: branches/upstream/libpoe-filter-http-parser-perl/current/t/release-pod-coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-filter-http-parser-perl/current/t/release-pod-coverage.t?rev=70879&op=file
==============================================================================
--- branches/upstream/libpoe-filter-http-parser-perl/current/t/release-pod-coverage.t (added)
+++ branches/upstream/libpoe-filter-http-parser-perl/current/t/release-pod-coverage.t Tue Mar 8 12:21:44 2011
@@ -1,0 +1,21 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate testing');
+ }
+}
+
+
+use Test::More;
+
+eval "use Test::Pod::Coverage 1.08";
+plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage"
+ if $@;
+
+eval "use Pod::Coverage::TrustPod";
+plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage"
+ if $@;
+
+all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
Added: branches/upstream/libpoe-filter-http-parser-perl/current/t/release-pod-syntax.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-filter-http-parser-perl/current/t/release-pod-syntax.t?rev=70879&op=file
==============================================================================
--- branches/upstream/libpoe-filter-http-parser-perl/current/t/release-pod-syntax.t (added)
+++ branches/upstream/libpoe-filter-http-parser-perl/current/t/release-pod-syntax.t Tue Mar 8 12:21:44 2011
@@ -1,0 +1,15 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate testing');
+ }
+}
+
+use Test::More;
+
+eval "use Test::Pod 1.41";
+plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
+
+all_pod_files_ok();
More information about the Pkg-perl-cvs-commits
mailing list