r4288 - in /packages/libhttp-server-simple-perl/trunk: ./ debian/ inc/Module/ inc/Module/Install/ lib/HTTP/Server/ lib/HTTP/Server/Simple/ lib/HTTP/Server/Simple/CGI/ t/

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Sun Nov 19 19:51:39 CET 2006


Author: gregoa-guest
Date: Sun Nov 19 19:51:39 2006
New Revision: 4288

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=4288
Log:
* New upstream release.
* Add liburi-perl to build dependencies.

Modified:
    packages/libhttp-server-simple-perl/trunk/Changes
    packages/libhttp-server-simple-perl/trunk/META.yml
    packages/libhttp-server-simple-perl/trunk/SIGNATURE
    packages/libhttp-server-simple-perl/trunk/debian/changelog
    packages/libhttp-server-simple-perl/trunk/debian/control
    packages/libhttp-server-simple-perl/trunk/inc/Module/Install.pm
    packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Base.pm
    packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Can.pm
    packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Fetch.pm
    packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Makefile.pm
    packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Metadata.pm
    packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Win32.pm
    packages/libhttp-server-simple-perl/trunk/inc/Module/Install/WriteAll.pm
    packages/libhttp-server-simple-perl/trunk/lib/HTTP/Server/Simple.pm
    packages/libhttp-server-simple-perl/trunk/lib/HTTP/Server/Simple/CGI.pm
    packages/libhttp-server-simple-perl/trunk/lib/HTTP/Server/Simple/CGI/Environment.pm
    packages/libhttp-server-simple-perl/trunk/t/01live.t
    packages/libhttp-server-simple-perl/trunk/t/03podcoverage.t
    packages/libhttp-server-simple-perl/trunk/t/04cgi.t

Modified: packages/libhttp-server-simple-perl/trunk/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/Changes?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/Changes (original)
+++ packages/libhttp-server-simple-perl/trunk/Changes Sun Nov 19 19:51:39 2006
@@ -1,3 +1,25 @@
+0.24
+
+  * Hopefully deal with an odd case where a poorly behaved Internet Explorer could crash the server.
+    Thanks to the Catalyst project.
+
+0.23
+  Fix a release-engineering messup. Thanks to ANDK
+
+
+0.22 Wed Oct 18 23:36:34 EDT 2006
+  * Query string processing improvements
+
+
+0.21 Wed Oct 18 23:31:42 EDT 2006
+   [rt.cpan.org #21727] [PATCH] Support for Perl 5.004
+    -- Sébastien Aperghis-Tramoni 
+
+0.19
+
+  Catch and ignore SIGPIPE, so broken pipes from the client don't cause 
+  Standalone to drop all the way back to the shell.
+
 0.20
 
   Require POSIX only if we need it, rather than "use" it all the time

Modified: packages/libhttp-server-simple-perl/trunk/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/META.yml?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/META.yml (original)
+++ packages/libhttp-server-simple-perl/trunk/META.yml Sun Nov 19 19:51:39 2006
@@ -1,5 +1,5 @@
 distribution_type: module
-generated_by: Module::Install version 0.62
+generated_by: Module::Install version 0.64
 license: perl
 name: HTTP-Server-Simple
 no_index: 
@@ -10,4 +10,4 @@
   CGI: 0
   Socket: 0
   Test::More: 0
-version: 0.20
+version: 0.24

Modified: packages/libhttp-server-simple-perl/trunk/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/SIGNATURE?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/SIGNATURE (original)
+++ packages/libhttp-server-simple-perl/trunk/SIGNATURE Sun Nov 19 19:51:39 2006
@@ -14,32 +14,32 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 51733cb90c63ff78f2b240a8daee74300c28de6f Changes
+SHA1 3a345c84d4a5a678e457a1b3681ab75f4a1bb78d Changes
 SHA1 0ac508c50476dcc2bf8fe3094cb341425291e1ee MANIFEST
-SHA1 9df9a468f970dd286ef72b010842afb1017f9324 META.yml
+SHA1 35ad715e6f91b8692d8c183daca803bd61301b4e META.yml
 SHA1 490f3fd115e09cb05b725580e5ed5cdd58241049 Makefile.PL
 SHA1 ed0c107672daac3bc9e266876666e1059dbe44b7 README
 SHA1 4ea1e9072ca87399184a46233df52a21e285604d ex/sample_server
-SHA1 e28cf2d3ba35f6ca3a448acc7bee191b7c390379 inc/Module/Install.pm
-SHA1 e7c1c86f57b6778f4bdc7fd8c1b950e60ef41bc0 inc/Module/Install/Base.pm
-SHA1 e1829448769445cdaac384a888bf9ccf42e0d89a inc/Module/Install/Can.pm
-SHA1 70aa5e2055e8e38b4eecc5fc8c91762c0e97f551 inc/Module/Install/Fetch.pm
-SHA1 8ac832baf4f9e8e72d3e8f103cee6e8a94ac80e1 inc/Module/Install/Makefile.pm
-SHA1 0807e79d6dbfda4fcd3db0fc7df2e33e0cba263b inc/Module/Install/Metadata.pm
-SHA1 4da0a1fce2339cc3f8c296c7716480d2564d9470 inc/Module/Install/Win32.pm
-SHA1 9a903a1d178954ad864c7dcc98f9fa5c005d1553 inc/Module/Install/WriteAll.pm
-SHA1 b139883aeec8fc0d1a17261164daf2a1be784a60 lib/HTTP/Server/Simple.pm
-SHA1 2d7348b166f654a460ddae4cb4183f4a544c85fc lib/HTTP/Server/Simple/CGI.pm
-SHA1 27c4b8c97f00d3427a320c8087e2b77b128a1992 lib/HTTP/Server/Simple/CGI/Environment.pm
+SHA1 9b2f9d83bcf77860f53a0c07c90a4a59ad9f5df1 inc/Module/Install.pm
+SHA1 abe32855d75ab13747cf65765af9947b7a8c3057 inc/Module/Install/Base.pm
+SHA1 95b81d1e91bd634467bf633571eff4420e9c04eb inc/Module/Install/Can.pm
+SHA1 1fe98c63cf9d7271c8cb4183ba230f152df69e26 inc/Module/Install/Fetch.pm
+SHA1 2249171a2b72cd73ff2c0a06597d29f86e5df456 inc/Module/Install/Makefile.pm
+SHA1 381bb98ea3877bba49ae85e7a7ea130645fd3dbf inc/Module/Install/Metadata.pm
+SHA1 0c2118868ef82ac517eb6d9c3bd93e6eb9bbf83e inc/Module/Install/Win32.pm
+SHA1 e827d6d43771032fa3df35c0ad5e5698d0e54cda inc/Module/Install/WriteAll.pm
+SHA1 eb4801495bff8da5254b1b8e6b4a1516946f64fe lib/HTTP/Server/Simple.pm
+SHA1 40f24374f2b5845a3025e14ca4b91bd58298de03 lib/HTTP/Server/Simple/CGI.pm
+SHA1 d35644a882953f699442654299cac16fa158b502 lib/HTTP/Server/Simple/CGI/Environment.pm
 SHA1 db064af54cab345a71daec576e32e64b8fb1033d t/00smoke.t
-SHA1 9e68bffc26b5a42e2785ec68c3bf6fe45d6bb6da t/01live.t
+SHA1 b64150ac4ebc772f8b1f69455039e7ea3e067b3f t/01live.t
 SHA1 aca95653cfce68912e08c57b3a4566207e2f99b3 t/02pod.t
-SHA1 90f0be3e6b0fab021155953742f5cc5c5e47a5aa t/03podcoverage.t
-SHA1 0ca7d32c396129b38a33a8077171b84076feb8d9 t/04cgi.t
+SHA1 a7024d0d8e7b80d26f75a3551a1406a797b382f8 t/03podcoverage.t
+SHA1 bbf511880e77fef4a252ed84438075cbb77924e4 t/04cgi.t
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.3 (Darwin)
 
-iD8DBQFEkWmyEi9d9xCOQEYRAmmoAKCA6RHTxab01NdvkfvsHBnj8kLbfwCfWOS7
-NrOuVXMr09xE3cCxeLmZJFs=
-=4JaR
+iD8DBQFFPGBpEi9d9xCOQEYRAtKUAJwJP6tf3XxTUnxc9VcUuxLFUx47WQCgr1mn
+sGZoEFrw2goxmQImU8MSuR4=
+=kehj
 -----END PGP SIGNATURE-----

Modified: packages/libhttp-server-simple-perl/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/debian/changelog?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/debian/changelog (original)
+++ packages/libhttp-server-simple-perl/trunk/debian/changelog Sun Nov 19 19:51:39 2006
@@ -1,3 +1,10 @@
+libhttp-server-simple-perl (0.24-1) unstable; urgency=low
+
+  * New upstream release.
+  * Add liburi-perl to build dependencies.
+
+ -- gregor herrmann <gregor+debian at comodo.priv.at>  Sun, 19 Nov 2006 19:50:13 +0100
+
 libhttp-server-simple-perl (0.20-1) unstable; urgency=low
 
   * New upstream release.

Modified: packages/libhttp-server-simple-perl/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/debian/control?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/debian/control (original)
+++ packages/libhttp-server-simple-perl/trunk/debian/control Sun Nov 19 19:51:39 2006
@@ -2,7 +2,7 @@
 Section: perl
 Priority: optional
 Build-Depends: debhelper (>= 5.0.0)
-Build-Depends-Indep: perl (>= 5.8.0-7), netbase, libtest-pod-perl, libtest-pod-coverage-perl
+Build-Depends-Indep: perl (>= 5.8.0-7), netbase, libtest-pod-perl, libtest-pod-coverage-perl, liburi-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Niko Tyni <ntyni at iki.fi>, gregor herrmann <gregor+debian at comodo.priv.at>
 Standards-Version: 3.7.2

Modified: packages/libhttp-server-simple-perl/trunk/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/inc/Module/Install.pm?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/inc/Module/Install.pm (original)
+++ packages/libhttp-server-simple-perl/trunk/inc/Module/Install.pm Sun Nov 19 19:51:39 2006
@@ -28,7 +28,7 @@
     # This is not enforced yet, but will be some time in the next few
     # releases once we can make sure it won't clash with custom
     # Module::Install extensions.
-    $VERSION = '0.62';
+    $VERSION = '0.64';
 }
 
 # Whether or not inc::Module::Install is actually loaded, the
@@ -47,6 +47,22 @@
 not:
 
     use ${\__PACKAGE__};
+
+END_DIE
+}
+
+# If the script that is loading Module::Install is from the future,
+# then make will detect this and cause it to re-run over and over
+# again. This is bad. Rather than taking action to touch it (which
+# is unreliable on some platforms and requires write permissions)
+# for now we should catch this and refuse to run.
+if ( -f $0 and (stat($0))[9] > time ) {
+	die << "END_DIE";
+Your installer $0 has a modification time in the future.
+
+This is known to create infinite loops in make.
+
+Please correct this, then run $0 again.
 
 END_DIE
 }

Modified: packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Base.pm?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Base.pm (original)
+++ packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Base.pm Sun Nov 19 19:51:39 2006
@@ -1,7 +1,7 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.62';
+$VERSION = '0.64';
 
 # Suspend handler for "redefined" warnings
 BEGIN {

Modified: packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Can.pm?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Can.pm (original)
+++ packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Can.pm Sun Nov 19 19:51:39 2006
@@ -11,7 +11,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.62';
+	$VERSION = '0.64';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Fetch.pm?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Fetch.pm (original)
+++ packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Fetch.pm Sun Nov 19 19:51:39 2006
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.62';
+	$VERSION = '0.64';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Makefile.pm?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Makefile.pm (original)
+++ packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Makefile.pm Sun Nov 19 19:51:39 2006
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.62';
+	$VERSION = '0.64';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Metadata.pm?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Metadata.pm (original)
+++ packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Metadata.pm Sun Nov 19 19:51:39 2006
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.62';
+	$VERSION = '0.64';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -123,9 +123,9 @@
 
     require Module::Build;
     my $build = Module::Build->new(
-        dist_name    => $self->{name},
-        dist_version => $self->{version},
-        license      => $self->{license},
+        dist_name    => $self->name,
+        dist_version => $self->version,
+        license      => $self->license,
     );
     $self->provides(%{ $build->find_dist_packages || {} });
 }

Modified: packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Win32.pm?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Win32.pm (original)
+++ packages/libhttp-server-simple-perl/trunk/inc/Module/Install/Win32.pm Sun Nov 19 19:51:39 2006
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.62';
+	$VERSION = '0.64';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: packages/libhttp-server-simple-perl/trunk/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/inc/Module/Install/WriteAll.pm?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/inc/Module/Install/WriteAll.pm (original)
+++ packages/libhttp-server-simple-perl/trunk/inc/Module/Install/WriteAll.pm Sun Nov 19 19:51:39 2006
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.62';
+	$VERSION = '0.64';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: packages/libhttp-server-simple-perl/trunk/lib/HTTP/Server/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/lib/HTTP/Server/Simple.pm?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/lib/HTTP/Server/Simple.pm (original)
+++ packages/libhttp-server-simple-perl/trunk/lib/HTTP/Server/Simple.pm Sun Nov 19 19:51:39 2006
@@ -1,15 +1,18 @@
 package HTTP::Server::Simple;
-use 5.006;
 use strict;
 use warnings;
+use FileHandle;
 use Socket;
 use Carp;
-
-our $VERSION = '0.20';
+use URI::Escape;
+
+use vars qw($VERSION $bad_request_doc);
+$VERSION = '0.24';
+
 
 =head1 NAME
 
-HTTP::Server::Simple
+HTTP::Server::Simple - Lightweight HTTP server
 
 
 =head1 SYNOPSIS
@@ -253,7 +256,7 @@
             local $SIG{PIPE} = 'IGNORE';    # If we don't ignore SIGPIPE, a
                  # client closing the connection before we
                  # finish sending will cause the server to exit
-            while ( accept( my $remote, HTTPDaemon ) ) {
+            while ( accept( my $remote = new FileHandle, HTTPDaemon ) ) {
                 $self->stdio_handle($remote);
                 $self->lookup_localhost() unless ($self->host);
                 $self->accept_hook if $self->can("accept_hook");
@@ -284,12 +287,15 @@
         binmode STDIN,  ':raw';
         binmode STDOUT, ':raw';
 
+        # The ternary operator below is to protect against a crash caused by IE
+        # Ported from Catalyst::Engine::HTTP (Originally by Jasper Krogh and Peter Edwards)
+        # ( http://dev.catalyst.perl.org/changeset/5195, 5221 )
+        
         my $remote_sockaddr = getpeername( $self->stdio_handle );
-        my ( undef, $iaddr ) = sockaddr_in($remote_sockaddr);
-        my $peeraddr = inet_ntoa($iaddr) || "127.0.0.1";
-
+        my ( undef, $iaddr ) = $remote_sockaddr ? sockaddr_in($remote_sockaddr) : (undef,undef);
+        my $peeraddr = $iaddr ? ( inet_ntoa($iaddr) || "127.0.0.1" ) : '127.0.0.1';
+        
         my ( $method, $request_uri, $proto ) = $self->parse_request;
-        
         
         unless ($self->valid_http_method($method) ) {
             $self->bad_request;
@@ -304,7 +310,7 @@
         $self->setup(
             method       => $method,
             protocol     => $proto,
-            query_string => ( $query_string || '' ),
+            query_string => ( defined($query_string) ? $query_string : '' ),
             request_uri  => $request_uri,
             path         => $file,
             localname    => $self->host,
@@ -523,7 +529,7 @@
     my $uri      = $2 || '';
     my $protocol = $3 || '';
 
-    return ( $method, $uri, $protocol );
+    return ( $method, uri_unescape( $uri ), $protocol );
 }
 
 =head2 parse_headers
@@ -604,7 +610,7 @@
 
 =cut
 
-our $bad_request_doc = join "", <DATA>;
+$bad_request_doc = join "", <DATA>;
 
 sub bad_request {
     my $self = shift;
@@ -623,7 +629,7 @@
 
 sub valid_http_method {
     my $self   = shift;
-    my $method = shift;
+    my $method = shift or return 0;
     return $method =~ /^(?:GET|POST|HEAD|PUT|DELETE)$/;
 }
 

Modified: packages/libhttp-server-simple-perl/trunk/lib/HTTP/Server/Simple/CGI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/lib/HTTP/Server/Simple/CGI.pm?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/lib/HTTP/Server/Simple/CGI.pm (original)
+++ packages/libhttp-server-simple-perl/trunk/lib/HTTP/Server/Simple/CGI.pm Sun Nov 19 19:51:39 2006
@@ -7,7 +7,8 @@
 
 use CGI ();
 
-our $VERSION = $HTTP::Server::Simple::VERSION;
+use vars qw($VERSION $default_doc);
+$VERSION = $HTTP::Server::Simple::VERSION;
 
 =head1 NAME
 
@@ -69,7 +70,6 @@
 
 =cut
 
-our $default_doc;
 $default_doc = ( join "", <DATA> );
 
 sub handle_request {

Modified: packages/libhttp-server-simple-perl/trunk/lib/HTTP/Server/Simple/CGI/Environment.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/lib/HTTP/Server/Simple/CGI/Environment.pm?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/lib/HTTP/Server/Simple/CGI/Environment.pm (original)
+++ packages/libhttp-server-simple-perl/trunk/lib/HTTP/Server/Simple/CGI/Environment.pm Sun Nov 19 19:51:39 2006
@@ -5,7 +5,8 @@
 use warnings;
 use HTTP::Server::Simple;
 
-our $VERSION = $HTTP::Server::Simple::VERSION;
+use vars qw($VERSION %ENV_MAPPING);
+$VERSION = $HTTP::Server::Simple::VERSION;
 
 my %clean_env = %ENV;
 
@@ -44,7 +45,7 @@
 
 sub setup_server_url {
     $ENV{SERVER_URL}
-        ||= ( "http://" . $ENV{SERVER_NAME} . ":" . $ENV{SERVER_PORT} . "/" );
+        ||= ( "http://" . ($ENV{SERVER_NAME} || 'localhost') . ":" . ( $ENV{SERVER_PORT}||80) . "/" );
 }
 
 =head2 setup_environment_from_metadata
@@ -56,7 +57,7 @@
 
 =cut
 
-our %ENV_MAPPING = (
+%ENV_MAPPING = (
     protocol     => "SERVER_PROTOCOL",
     localport    => "SERVER_PORT",
     localname    => "SERVER_NAME",

Modified: packages/libhttp-server-simple-perl/trunk/t/01live.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/t/01live.t?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/t/01live.t (original)
+++ packages/libhttp-server-simple-perl/trunk/t/01live.t Sun Nov 19 19:51:39 2006
@@ -19,12 +19,12 @@
 
     my $pid=$s->background();
 
-    like($pid, qr/^-?\d+$/,'pid is numeric');
+    like($pid, '/^-?\d+$/', 'pid is numeric');
     select(undef,undef,undef,0.2); # wait a sec
 
     my $content=fetch("GET / HTTP/1.1", "");
 
-    like($content, qr/Congratulations/, "Returns a page");
+    like($content, '/Congratulations/', "Returns a page");
     is(kill(9,$pid),1,'Signaled 1 process successfully');
     wait or die "couldn't wait for sub-process completion";
 }
@@ -35,22 +35,22 @@
     my $pid=$s->background();
     diag("started server on $pid");
     select(undef,undef,undef,0.2); # wait a sec
-    like($pid, qr/^-?\d+$/,'pid is numeric');
+    like($pid, '/^-?\d+$/', 'pid is numeric');
 
     my $content=fetch("GET / HTTP/1.1", "");
-    like($content,qr/Congratulations/,"Returns a page");
+    like($content, '/Congratulations/', "Returns a page");
 
     eval {
 	like(fetch("GET your mum wet"),  # anything does!
-	     qr/bad request/i,
+	     '/bad request/i',
 	     "knows what a request isn't");
     };
     fail("got exception in client: $@") if $@;
 
-    like(fetch("GET / HTTP/1.1", ""), qr/Congratulations/,
+    like(fetch("GET / HTTP/1.1", ""), '/Congratulations/',
 	 "HTTP/1.1 request");
 
-    like(fetch("GET /"), qr/Congratulations/,
+    like(fetch("GET /"), '/Congratulations/',
 	 "HTTP/0.9 request");
 
     is(kill(9,$pid),1,'Signaled 1 process successfully');

Modified: packages/libhttp-server-simple-perl/trunk/t/03podcoverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/t/03podcoverage.t?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/t/03podcoverage.t (original)
+++ packages/libhttp-server-simple-perl/trunk/t/03podcoverage.t Sun Nov 19 19:51:39 2006
@@ -5,5 +5,5 @@
 
 eval "use Test::Pod::Coverage 1.04";
 plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
-all_pod_coverage_ok({  also_private => [ qr/^[A-Z_]+$/ ], });
+all_pod_coverage_ok({  also_private => [ '/^[A-Z_]+$/' ], });
 

Modified: packages/libhttp-server-simple-perl/trunk/t/04cgi.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libhttp-server-simple-perl/trunk/t/04cgi.t?rev=4288&op=diff
==============================================================================
--- packages/libhttp-server-simple-perl/trunk/t/04cgi.t (original)
+++ packages/libhttp-server-simple-perl/trunk/t/04cgi.t Sun Nov 19 19:51:39 2006
@@ -1,11 +1,18 @@
-use Test::More tests => 20;
+use Test::More;
 use Socket;
 use strict;
+
+eval "use Data::Dumper";
+if ($@) {
+    plan skip_all => "Data::Dumper not available";
+}else {
+    plan tests => 20;
+}
 
 use constant PORT => 13432;
 my $host = gethostbyaddr(inet_aton('localhost'), AF_INET);
 
-our %methods=(
+my %methods=(
               url => "url: http://$host:".PORT,
               path_info => 'path_info: /cgitest/path_info',
               server_name => "server_name: $host",
@@ -14,7 +21,7 @@
               request_method => 'request_method: GET',
             );
 
-our %envvars=(
+my %envvars=(
               SERVER_URL => "SERVER_URL: http://$host:".PORT.'/',
               SERVER_PORT => 'SERVER_PORT: '.PORT,
               REQUEST_METHOD => 'REQUEST_METHOD: GET',
@@ -34,15 +41,15 @@
 
   my $pid=$server->background;
 
-  like($pid,qr/^-?\d+$/,'pid is numeric');
+  like($pid, '/^-?\d+$/', 'pid is numeric');
 
   select(undef,undef,undef,0.2); # wait a sec
-  like(fetch("GET / HTTP/1.1",""),qr(NOFILE),'no file');
+  like(fetch("GET / HTTP/1.1",""), '/NOFILE/', 'no file');
 
   foreach my $method (keys(%methods)) {
     like(
           fetch("GET /cgitest/$method HTTP/1.1",""),
-          qr($methods{$method}),
+          "/$methods{$method}/",
           "method - $method"
         );
     select(undef,undef,undef,0.2); # wait a sec
@@ -51,7 +58,7 @@
   foreach my $envvar (keys(%envvars)) {
     like(
           fetch("GET /cgitest/$envvar HTTP/1.1",""),
-          qr($envvars{$envvar}),
+          "/$envvars{$envvar}/",
           "Environment - $envvar"
         );
     select(undef,undef,undef,0.2); # wait a sec
@@ -134,7 +141,7 @@
   package CGIServer;
   use base qw(HTTP::Server::Simple::CGI);
   use Env;
-  use Data::Dumper;
+  eval "use Data::Dumper";
 
 
   sub handle_request {
@@ -149,7 +156,7 @@
     print "Content-Type: text/html\r\nContent-Length: ";
     my $response;
     if($methods{$file}) {
-      $response="$file: ".$cgi->$file;
+      $response = "$file: ".$cgi->$file();
     } elsif($envvars{$file}) {
       $response="$file: $ENV{$file}";
     } else {




More information about the Pkg-perl-cvs-commits mailing list