r57265 - in /branches/upstream/libplack-perl/current: ./ lib/ lib/Plack/ lib/Plack/Middleware/ lib/Plack/Server/ t/Plack-Handler/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sat May 1 23:15:08 UTC 2010


Author: jawnsy-guest
Date: Sat May  1 23:15:00 2010
New Revision: 57265

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=57265
Log:
[svn-upgrade] Integrating new upstream version, libplack-perl (0.9933)

Modified:
    branches/upstream/libplack-perl/current/Changes
    branches/upstream/libplack-perl/current/META.yml
    branches/upstream/libplack-perl/current/lib/Plack.pm
    branches/upstream/libplack-perl/current/lib/Plack/Loader.pm
    branches/upstream/libplack-perl/current/lib/Plack/Middleware/Lint.pm
    branches/upstream/libplack-perl/current/lib/Plack/Request.pm
    branches/upstream/libplack-perl/current/lib/Plack/Response.pm
    branches/upstream/libplack-perl/current/lib/Plack/Runner.pm
    branches/upstream/libplack-perl/current/lib/Plack/Server/ServerSimple.pm
    branches/upstream/libplack-perl/current/lib/Plack/Util.pm
    branches/upstream/libplack-perl/current/t/Plack-Handler/net_fastcgi.t

Modified: branches/upstream/libplack-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libplack-perl/current/Changes?rev=57265&op=diff
==============================================================================
--- branches/upstream/libplack-perl/current/Changes (original)
+++ branches/upstream/libplack-perl/current/Changes Sat May  1 23:15:00 2010
@@ -1,6 +1,12 @@
 Revision history for Perl extension Plack
 
 Take a look at http://github.com/miyagawa/Plack/issues for the planned changes before 1.0 release.
+
+0.9933  Tue Apr 27 14:32:23 PDT 2010
+        - refactored the app.psgi loading error handling
+        - Enable type checking of the app in Lint->wrap
+        - allow plackup -e'...'
+        - Disable FCGI::Client/Net::FastCGI test by default
 
 0.9932  Mon Apr 19 15:23:55 JST 2010
         - Enable Lint middleware by default in the development env

Modified: branches/upstream/libplack-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libplack-perl/current/META.yml?rev=57265&op=diff
==============================================================================
--- branches/upstream/libplack-perl/current/META.yml (original)
+++ branches/upstream/libplack-perl/current/META.yml Sat May  1 23:15:00 2010
@@ -38,4 +38,4 @@
 resources:
   license: http://dev.perl.org/licenses/
   repository: git://github.com/miyagawa/Plack.git
-version: 0.9932
+version: 0.9933

Modified: branches/upstream/libplack-perl/current/lib/Plack.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libplack-perl/current/lib/Plack.pm?rev=57265&op=diff
==============================================================================
--- branches/upstream/libplack-perl/current/lib/Plack.pm (original)
+++ branches/upstream/libplack-perl/current/lib/Plack.pm Sat May  1 23:15:00 2010
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 use 5.008_001;
-our $VERSION = '0.9932';
+our $VERSION = '0.9933';
 $VERSION = eval $VERSION;
 
 1;

Modified: branches/upstream/libplack-perl/current/lib/Plack/Loader.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libplack-perl/current/lib/Plack/Loader.pm?rev=57265&op=diff
==============================================================================
--- branches/upstream/libplack-perl/current/lib/Plack/Loader.pm (original)
+++ branches/upstream/libplack-perl/current/lib/Plack/Loader.pm Sat May  1 23:15:00 2010
@@ -98,7 +98,7 @@
   Plack::Loader->auto(%args)->run($app);
 
   # specify the implementation with a name
-  Plack::Loader->load('Standalone::Prefork', %args)->run($app);
+  Plack::Loader->load('FCGI', %args)->run($app);
 
 =head1 DESCRIPTION
 

Modified: branches/upstream/libplack-perl/current/lib/Plack/Middleware/Lint.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libplack-perl/current/lib/Plack/Middleware/Lint.pm?rev=57265&op=diff
==============================================================================
--- branches/upstream/libplack-perl/current/lib/Plack/Middleware/Lint.pm (original)
+++ branches/upstream/libplack-perl/current/lib/Plack/Middleware/Lint.pm Sat May  1 23:15:00 2010
@@ -10,7 +10,7 @@
     my($self, $app) = @_;
 
     unless (ref $app eq 'CODE' or overload::Method($app, '&{}')) {
-        Carp::croak("PSGI app should be a code reference: $app");
+        Carp::croak("PSGI app should be a code reference: ", (defined $app ? $app : "undef"));
     }
 
     $self->SUPER::wrap($app);

Modified: branches/upstream/libplack-perl/current/lib/Plack/Request.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libplack-perl/current/lib/Plack/Request.pm?rev=57265&op=diff
==============================================================================
--- branches/upstream/libplack-perl/current/lib/Plack/Request.pm (original)
+++ branches/upstream/libplack-perl/current/lib/Plack/Request.pm Sat May  1 23:15:00 2010
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 use 5.008_001;
-our $VERSION = '0.9932';
+our $VERSION = '0.9933';
 $VERSION = eval $VERSION;
 
 use HTTP::Headers;

Modified: branches/upstream/libplack-perl/current/lib/Plack/Response.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libplack-perl/current/lib/Plack/Response.pm?rev=57265&op=diff
==============================================================================
--- branches/upstream/libplack-perl/current/lib/Plack/Response.pm (original)
+++ branches/upstream/libplack-perl/current/lib/Plack/Response.pm Sat May  1 23:15:00 2010
@@ -1,7 +1,7 @@
 package Plack::Response;
 use strict;
 use warnings;
-our $VERSION = '0.9932';
+our $VERSION = '0.9933';
 $VERSION = eval $VERSION;
 
 use Plack::Util::Accessor qw(body status);

Modified: branches/upstream/libplack-perl/current/lib/Plack/Runner.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libplack-perl/current/lib/Plack/Runner.pm?rev=57265&op=diff
==============================================================================
--- branches/upstream/libplack-perl/current/lib/Plack/Runner.pm (original)
+++ branches/upstream/libplack-perl/current/lib/Plack/Runner.pm Sat May  1 23:15:00 2010
@@ -28,8 +28,8 @@
 
     local @ARGV = @_;
 
-    # From 'prove': Allow cuddling the paths with -I and -M
-    @ARGV = map { /^(-[IM])(.+)/ ? ($1,$2) : $_ } @ARGV;
+    # From 'prove': Allow cuddling the paths with -I, -M and -e
+    @ARGV = map { /^(-[IMe])(.+)/ ? ($1,$2) : $_ } @ARGV;
 
     my($host, $port, $socket, @listen);
 

Modified: branches/upstream/libplack-perl/current/lib/Plack/Server/ServerSimple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libplack-perl/current/lib/Plack/Server/ServerSimple.pm?rev=57265&op=diff
==============================================================================
--- branches/upstream/libplack-perl/current/lib/Plack/Server/ServerSimple.pm (original)
+++ branches/upstream/libplack-perl/current/lib/Plack/Server/ServerSimple.pm Sat May  1 23:15:00 2010
@@ -1,6 +1,6 @@
 package Plack::Server::ServerSimple;
 use strict;
-our $VERSION = '0.9932';
+our $VERSION = '0.9933';
 $VERSION = eval $VERSION;
 
 use parent qw(Plack::Handler::HTTP::Server::Simple);

Modified: branches/upstream/libplack-perl/current/lib/Plack/Util.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libplack-perl/current/lib/Plack/Util.pm?rev=57265&op=diff
==============================================================================
--- branches/upstream/libplack-perl/current/lib/Plack/Util.pm (original)
+++ branches/upstream/libplack-perl/current/lib/Plack/Util.pm Sat May  1 23:15:00 2010
@@ -105,7 +105,14 @@
     my $_package = $_file;
     $_package =~ s/([^A-Za-z0-9_])/sprintf("_%2x", unpack("C", $1))/eg;
 
-    eval "package Plack::Sandbox::$_package; do(\$_file) or die(\$\@ || \$!)";
+    return eval sprintf <<'END_EVAL', $_package;
+package Plack::Sandbox::%s;
+{
+    my $app = do $_file;
+    if ( !$app && ( my $error = $@ || $! )) { die $error; }
+    $app;
+}
+END_EVAL
 }
 
 sub load_psgi {
@@ -115,14 +122,10 @@
 
     my $file = $stuff =~ /^[a-zA-Z0-9\_\:]+$/ ? class_to_file($stuff) : $stuff;
     my $app = _load_sandbox($file);
+    die "Error while loading $file: $@" if $@;
+
     return $app->to_app if $app and Scalar::Util::blessed($app) and $app->can('to_app');
-    return $app if $app and (ref $app eq 'CODE' or overload::Method($app, '&{}'));
-
-    if (my $e = $@ || $!) {
-        die "Can't load $file: $e";
-    } else {
-        Carp::croak("$file doesn't return PSGI app handler: " . ($app || undef));
-    }
+    return $app;
 }
 
 sub run_app($$) {

Modified: branches/upstream/libplack-perl/current/t/Plack-Handler/net_fastcgi.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libplack-perl/current/t/Plack-Handler/net_fastcgi.t?rev=57265&op=diff
==============================================================================
--- branches/upstream/libplack-perl/current/t/Plack-Handler/net_fastcgi.t (original)
+++ branches/upstream/libplack-perl/current/t/Plack-Handler/net_fastcgi.t Sat May  1 23:15:00 2010
@@ -6,6 +6,9 @@
 use Test::TCP;
 use Plack::Test::Suite;
 use t::FCGIUtils;
+
+plan skip_all => "Set TEST_FCGI_CLIENT to test this"
+    unless $ENV{TEST_FCGI_CLIENT};
 
 my $http_port;
 my $fcgi_port;




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