r30728 - in /branches/upstream/libcgi-application-server-perl/current: Build.PL ChangeLog MANIFEST META.yml Makefile.PL README lib/CGI/Application/Server.pm t/006_replacequeryobject.t t/lib/ReplaceQueryObject.pm

thialme-guest at users.alioth.debian.org thialme-guest at users.alioth.debian.org
Sun Feb 15 18:51:13 UTC 2009


Author: thialme-guest
Date: Sun Feb 15 18:51:10 2009
New Revision: 30728

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=30728
Log:
[svn-upgrade] Integrating new upstream version, libcgi-application-server-perl (0.061)

Added:
    branches/upstream/libcgi-application-server-perl/current/t/006_replacequeryobject.t
    branches/upstream/libcgi-application-server-perl/current/t/lib/ReplaceQueryObject.pm
Modified:
    branches/upstream/libcgi-application-server-perl/current/Build.PL
    branches/upstream/libcgi-application-server-perl/current/ChangeLog
    branches/upstream/libcgi-application-server-perl/current/MANIFEST
    branches/upstream/libcgi-application-server-perl/current/META.yml
    branches/upstream/libcgi-application-server-perl/current/Makefile.PL
    branches/upstream/libcgi-application-server-perl/current/README
    branches/upstream/libcgi-application-server-perl/current/lib/CGI/Application/Server.pm

Modified: branches/upstream/libcgi-application-server-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-application-server-perl/current/Build.PL?rev=30728&op=diff
==============================================================================
--- branches/upstream/libcgi-application-server-perl/current/Build.PL (original)
+++ branches/upstream/libcgi-application-server-perl/current/Build.PL Sun Feb 15 18:51:10 2009
@@ -10,7 +10,7 @@
         'Carp'          => '0.01',
         'HTTP::Request' => '0',
         'HTTP::Status'  => '0',
-        'CGI::Application'             => '0',
+        'CGI::Application'             => '4.21',
         'HTTP::Server::Simple'         => '0.18',
         'HTTP::Server::Simple::Static' => '0.02',
     },

Modified: branches/upstream/libcgi-application-server-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-application-server-perl/current/ChangeLog?rev=30728&op=diff
==============================================================================
--- branches/upstream/libcgi-application-server-perl/current/ChangeLog (original)
+++ branches/upstream/libcgi-application-server-perl/current/ChangeLog Sun Feb 15 18:51:10 2009
@@ -1,4 +1,8 @@
 Changes for CGI::Application::Server
+
+0.061			2009-02-08
+					reinitialize $query between runs when entry point is an object
+					(patch from JALDHAR, rt #42199)
 
 0.060 Sun. Nov  2, 2008
 		- a number of patches from George Hartzell; thanks!

Modified: branches/upstream/libcgi-application-server-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-application-server-perl/current/MANIFEST?rev=30728&op=diff
==============================================================================
--- branches/upstream/libcgi-application-server-perl/current/MANIFEST (original)
+++ branches/upstream/libcgi-application-server-perl/current/MANIFEST Sun Feb 15 18:51:10 2009
@@ -11,11 +11,13 @@
 t/003_dispatch.t
 t/004_object_as_entry_point.t
 t/005_mode_param_from_path_info.t
+t/006_replacequeryobject.t
 t/htdocs/index.html
 t/htdocs/test.css
 t/htdocs/test.js
 t/lib/AppWithParams.pm
 t/lib/MyCGIApp.pm
 t/lib/MyCGIApp/Dispatch.pm
+t/lib/ReplaceQueryObject.pm
 t/pod.t
 t/pod_coverage.t

Modified: branches/upstream/libcgi-application-server-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-application-server-perl/current/META.yml?rev=30728&op=diff
==============================================================================
--- branches/upstream/libcgi-application-server-perl/current/META.yml (original)
+++ branches/upstream/libcgi-application-server-perl/current/META.yml Sun Feb 15 18:51:10 2009
@@ -1,6 +1,6 @@
 ---
 name: CGI-Application-Server
-version: 0.060
+version: 0.061
 author:
   - 'Stevan Little E<lt>stevan at iinteractive.comE<gt>'
   - 'Rob Kinyon E<lt>rob.kinyon at iinteractive.comE<gt>'
@@ -10,7 +10,7 @@
 resources:
   license: http://dev.perl.org/licenses/
 requires:
-  CGI::Application: 0
+  CGI::Application: 4.21
   Carp: 0.01
   HTTP::Request: 0
   HTTP::Server::Simple: 0.18
@@ -26,7 +26,7 @@
 provides:
   CGI::Application::Server:
     file: lib/CGI/Application/Server.pm
-    version: 0.060
+    version: 0.061
 generated_by: Module::Build version 0.3
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.2.html

Modified: branches/upstream/libcgi-application-server-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-application-server-perl/current/Makefile.PL?rev=30728&op=diff
==============================================================================
--- branches/upstream/libcgi-application-server-perl/current/Makefile.PL (original)
+++ branches/upstream/libcgi-application-server-perl/current/Makefile.PL Sun Feb 15 18:51:10 2009
@@ -16,7 +16,7 @@
                            'Carp' => '0.01',
                            'Test::More' => '0.47',
                            'HTTP::Server::Simple' => '0.18',
-                           'CGI::Application' => '0',
+                           'CGI::Application' => '4.21',
                            'HTTP::Request' => '0',
                            'Test::WWW::Mechanize' => '1.08',
                            'HTTP::Server::Simple::Static' => '0.02'

Modified: branches/upstream/libcgi-application-server-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-application-server-perl/current/README?rev=30728&op=diff
==============================================================================
--- branches/upstream/libcgi-application-server-perl/current/README (original)
+++ branches/upstream/libcgi-application-server-perl/current/README Sun Feb 15 18:51:10 2009
@@ -1,4 +1,4 @@
-CGI::Application::Server version 0.060
+CGI::Application::Server version 0.061
 ======================================
 
 See the individual module documentation for more information

Modified: branches/upstream/libcgi-application-server-perl/current/lib/CGI/Application/Server.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-application-server-perl/current/lib/CGI/Application/Server.pm?rev=30728&op=diff
==============================================================================
--- branches/upstream/libcgi-application-server-perl/current/lib/CGI/Application/Server.pm (original)
+++ branches/upstream/libcgi-application-server-perl/current/lib/CGI/Application/Server.pm Sun Feb 15 18:51:10 2009
@@ -10,7 +10,7 @@
 use HTTP::Response;
 use HTTP::Status;
 
-our $VERSION = '0.060';
+our $VERSION = '0.061';
 
 use base qw( HTTP::Server::Simple::CGI );
 use HTTP::Server::Simple::Static;
@@ -77,8 +77,8 @@
 sub handle_request {
     my ($self, $cgi) = @_;
     if (my ($path, $target) = $self->is_valid_entry_point($ENV{REQUEST_URI})) {
-        warn "$ENV{REQUEST_URI} ($target)\n";
-        warn "\t$_ => " . param( $_ ) . "\n" for param();
+        # warn "$ENV{REQUEST_URI} ($target)\n";
+        # warn "\t$_ => " . param( $_ ) . "\n" for param();
 
         local $ENV{CGI_APP_RETURN_ONLY} = 1;
         (local $ENV{PATH_INFO} = $ENV{PATH_INFO}) =~ s/\A\Q$path//;
@@ -92,6 +92,7 @@
           if (!defined blessed $target) {
 	    return $self->_serve_response($target->new->run);
           } else {
+        $target->query($cgi);
 	    return $self->_serve_response($target->run);
           }
 	}

Added: branches/upstream/libcgi-application-server-perl/current/t/006_replacequeryobject.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-application-server-perl/current/t/006_replacequeryobject.t?rev=30728&op=file
==============================================================================
--- branches/upstream/libcgi-application-server-perl/current/t/006_replacequeryobject.t (added)
+++ branches/upstream/libcgi-application-server-perl/current/t/006_replacequeryobject.t Sun Feb 15 18:51:10 2009
@@ -1,0 +1,43 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+use CGI::Application::Server;
+use Test::More tests => 5;
+use Test::WWW::Mechanize;
+use lib 't/lib';
+use ReplaceQueryObject;
+
+my $app = ReplaceQueryObject->new();
+
+{
+    package TestServer;
+    use base qw/
+        Test::HTTP::Server::Simple
+        CGI::Application::Server
+    /;
+}
+
+my $server = TestServer->new();
+
+$server->entry_points({
+    '/one.cgi' => $app,
+    '/two.cgi' => 'ReplaceQueryObject',
+});
+
+my $url_root = $server->started_ok("start up my web server");
+
+my $mech = Test::WWW::Mechanize->new();
+
+$mech->get($url_root . '/one.cgi?text=foo');
+$mech->title_is('foo', '... got foo with CGI::Application object');
+
+$mech->get($url_root . '/one.cgi?text=bar');
+$mech->title_is('bar', '... got bar with CGI::Application object');
+
+$mech->get($url_root . '/two.cgi?text=foo');
+$mech->title_is('foo', '... got foo with CGI::Application class');
+
+$mech->get($url_root . '/two.cgi?text=bar');
+$mech->title_is('bar', '... got bar with CGI::Application class');
+

Added: branches/upstream/libcgi-application-server-perl/current/t/lib/ReplaceQueryObject.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcgi-application-server-perl/current/t/lib/ReplaceQueryObject.pm?rev=30728&op=file
==============================================================================
--- branches/upstream/libcgi-application-server-perl/current/t/lib/ReplaceQueryObject.pm (added)
+++ branches/upstream/libcgi-application-server-perl/current/t/lib/ReplaceQueryObject.pm Sun Feb 15 18:51:10 2009
@@ -1,0 +1,21 @@
+package ReplaceQueryObject;
+use base 'CGI::Application';
+use warnings;
+use strict;
+
+sub setup {
+    my ($self) = @_;
+    $self->run_modes([qw/ start /]);
+}
+
+sub start {
+    my ($self) = @_;
+    my $q = $self->query;
+    return join "\n",
+        $q->start_html($q->param('text')) .
+        $q->end_html
+    ;
+}
+
+1;
+




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