[Catalyst-commits] r12636 - in Catalyst-Runtime/5.80/branches/psgi:
. lib lib/Catalyst lib/Catalyst/Script t/aggregate
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Thu Jan 14 04:02:48 GMT 2010
Author: rafl
Date: 2010-01-14 04:02:47 +0000 (Thu, 14 Jan 2010)
New Revision: 12636
Added:
Catalyst-Runtime/5.80/branches/psgi/t/aggregate/deprecated_test_import.t
Modified:
Catalyst-Runtime/5.80/branches/psgi/Changes
Catalyst-Runtime/5.80/branches/psgi/Makefile.PL
Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst.pm
Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Engine.pm
Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Runtime.pm
Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script/FastCGI.pm
Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script/Server.pm
Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Test.pm
Catalyst-Runtime/5.80/branches/psgi/t/aggregate/unit_core_script_server.t
Catalyst-Runtime/5.80/branches/psgi/t/aggregate/unit_load_catalyst_test.t
Log:
Merge branch 'master' into psgi
* master:
Depend on n:c 0.12 to work on perl >= 5.11.2.
Version 5.80018.
canonical() is a no-op for the base uri.
Fix a deprecation warning in the tests.
Fix URI bug masked by HTTP::Request::AsCGI
Deprecate bare imports of Catalyst::Test - either use an app name or don't run the import method. As-per r12564
Apply patch to clarify uri_for action from Octavian Rasnita on list
Version 5.80017.
require autoclean once only
Bump version of ::Role::WithOverloading
Bump dep
Un stupid
Correctly pass argv option into Catalyst::Engine::HTTP
Changelog Adopt::NEXT warnings
Back out r12493, use \Q instead
Don't screw over people using --detach, <sigh>
Clarify comment.
Conflicts:
lib/Catalyst/Engine/CGI.pm
lib/Catalyst/Engine/HTTP.pm
t/aggregate/unit_core_script_server.t
Modified: Catalyst-Runtime/5.80/branches/psgi/Changes
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/Changes 2010-01-14 03:49:27 UTC (rev 12635)
+++ Catalyst-Runtime/5.80/branches/psgi/Changes 2010-01-14 04:02:47 UTC (rev 12636)
@@ -1,19 +1,51 @@
# This file documents the revision history for Perl extension Catalyst.
+5.80018 2010-01-12 22:24:20
+
+ Bug fixed:
+ - Call ->canonical on URI derived from $ENV{REQUEST_URI} to get
+ paths correctly decoded. This bug was previously hidden by a bug
+ in HTTP::Request::AsCGI
+
Documentation:
+ - Clarify that uri_for_action works on private paths, with example.
+
+ Deprecations:
+ - Saying use Catalyst::Test; (without an application name or () to stop
+ the importer running is now deprecated and will issue a warning.
+ You should be saying use Catalyst::Test ();
+
+5.80017 2010-01-10 02:27:29
+
+ Documentation:
- Fix docs for ->forward method when passed a class name - this should
be a component name (e.g. View::HTML, not a full class name, like
MyApp::View::HTML).
Bug fixes:
- - Remove the erroneous --detach option from Catalyst::Script::FastCGI
- - --daemon option to Catalyst::Script::FastCGI is fixed.
+ - --daemon and -d options to Catalyst::Script::FastCGI are fixed.
- Fix the debug dump for applications which use Catalyst::Plugin::Session
(RT#52898)
- Fix regression in the case where mod_rewrite is being used to rewrite
requests into a path below your application base introduced with the
%2F related fixes in 5.80014_02.
+ - Do not crash on SIGHUP if Catalyst::Engine::HTTP->run is not passed the
+ argv key in the options hash.
+ - Correctly pass the arguments to Catalyst::Script::Server through to
+ Catalyst::Engine::HTTP->run so that the server can restart itself
+ with the correct options on SIGHUP.
+ - Require new MooseX::MethodAttributes to be compatible with Moose
+ versions >= 0.93_01
+ - Require new MooseX::Role::WithOverloading to be compatible with Moose
+ versions >= 0.93_01
+ Cleanups:
+ - Stop suppressing warnings from Class::C3::Adopt::NEXT now that most plugins
+ have been updated to not use NEXT. If you get warnings then please upgrade
+ your components or log a bug with the component author if an upgrade is
+ not available. The Class::C3::Adopt::NEXT documentation contains information
+ about how to suppress the warnings in your application if you need to.
+
5.80016 2009-12-11 23:23:33
Bug fixes:
Modified: Catalyst-Runtime/5.80/branches/psgi/Makefile.PL
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/Makefile.PL 2010-01-14 03:49:27 UTC (rev 12635)
+++ Catalyst-Runtime/5.80/branches/psgi/Makefile.PL 2010-01-14 04:02:47 UTC (rev 12636)
@@ -17,14 +17,13 @@
requires 'List::MoreUtils';
requires 'namespace::autoclean' => '0.09';
-requires 'namespace::clean';
-requires 'namespace::autoclean';
+requires 'namespace::clean' => '0.12';
requires 'B::Hooks::EndOfScope' => '0.08';
requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00903';
requires 'Class::MOP' => '0.95';
requires 'Moose' => '0.93';
-requires 'MooseX::MethodAttributes::Inheritable' => '0.17';
-requires 'MooseX::Role::WithOverloading' => '0.03';
+requires 'MooseX::MethodAttributes::Inheritable' => '0.19';
+requires 'MooseX::Role::WithOverloading' => '0.05';
requires 'Carp';
requires 'Class::C3::Adopt::NEXT' => '0.07';
requires 'CGI::Simple::Cookie';
Modified: Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Engine.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Engine.pm 2010-01-14 03:49:27 UTC (rev 12635)
+++ Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Engine.pm 2010-01-14 04:02:47 UTC (rev 12636)
@@ -304,7 +304,8 @@
</html>
- # Trick IE
+ # Trick IE. Old versions of IE would display their own error page instead
+ # of ours if we'd give it less than 512 bytes.
$c->res->{body} .= ( ' ' x 512 );
# Return 500
Modified: Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Runtime.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Runtime.pm 2010-01-14 03:49:27 UTC (rev 12635)
+++ Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Runtime.pm 2010-01-14 04:02:47 UTC (rev 12636)
@@ -7,7 +7,7 @@
# Remember to update this in Catalyst as well!
-our $VERSION='5.80016';
+our $VERSION='5.80018';
$VERSION = eval $VERSION;
Modified: Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script/FastCGI.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script/FastCGI.pm 2010-01-14 03:49:27 UTC (rev 12635)
+++ Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script/FastCGI.pm 2010-01-14 04:02:47 UTC (rev 12636)
@@ -27,7 +27,7 @@
traits => [qw(Getopt)],
isa => Bool,
is => 'ro',
- cmd_aliases => 'd',
+ cmd_aliases => [qw/d detach/], # Eww, detach is here as we fucked it up.. Deliberately not documented
documentation => 'Daemonize (go into the background)',
);
Modified: Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script/Server.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script/Server.pm 2010-01-14 03:49:27 UTC (rev 12635)
+++ Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Script/Server.pm 2010-01-14 04:02:47 UTC (rev 12636)
@@ -195,6 +195,7 @@
$self->port,
$self->host,
{
+ argv => $self->ARGV,
map { $_ => $self->$_ } qw/
fork
keepalive
Modified: Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Test.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Test.pm 2010-01-14 03:49:27 UTC (rev 12635)
+++ Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Test.pm 2010-01-14 04:02:47 UTC (rev 12636)
@@ -107,6 +107,12 @@
sub import {
my ($self, $class, $opts) = @_;
+ Carp::carp(
+qq{Importing Catalyst::Test without an application name is deprecated:\n
+Instead of saying: use Catalyst::Test;
+say: use Catalyst::Test (); # If you don't want to import a test app right now.
+or say: use Catalyst::Test 'MyApp'; # If you do want to import a test app.\n\n})
+ unless $class;
$import->($self, '-all' => { class => $class });
$opts = {} unless ref $opts eq 'HASH';
$default_host = $opts->{default_host} if exists $opts->{default_host};
Modified: Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst.pm 2010-01-14 03:49:27 UTC (rev 12635)
+++ Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst.pm 2010-01-14 04:02:47 UTC (rev 12636)
@@ -79,7 +79,7 @@
# Remember to update this in Catalyst::Runtime as well!
-our $VERSION = '5.80016';
+our $VERSION = '5.80018';
$VERSION = eval $VERSION;
sub import {
@@ -1330,6 +1330,20 @@
You can also pass in a Catalyst::Action object, in which case it is passed to
C<< $c->uri_for >>.
+Note that although the path looks like a URI that dispatches to the wanted action, it is not a URI, but an internal path to that action.
+
+For example, if the action looks like:
+
+ package MyApp::Controller::Users;
+
+ sub lst : Path('the-list') {}
+
+You can use:
+
+ $c->uri_for_action('/users/lst')
+
+and it will create the URI /users/the-list.
+
=back
=cut
@@ -2889,6 +2903,8 @@
obra: Jesse Vincent
+Octavian Rasnita
+
omega: Andreas Marienborg
Oleg Kostyuk <cub.uanic at gmail.com>
Added: Catalyst-Runtime/5.80/branches/psgi/t/aggregate/deprecated_test_import.t
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/t/aggregate/deprecated_test_import.t (rev 0)
+++ Catalyst-Runtime/5.80/branches/psgi/t/aggregate/deprecated_test_import.t 2010-01-14 04:02:47 UTC (rev 12636)
@@ -0,0 +1,16 @@
+use strict;
+use warnings;
+
+use Test::More;
+use Catalyst::Test ();
+
+my $warn;
+{
+ local $SIG{__WARN__} = sub { $warn = shift; };
+ Catalyst::Test->import();
+}
+ok $warn;
+like $warn, qr/deprecated/;
+
+done_testing;
+
Modified: Catalyst-Runtime/5.80/branches/psgi/t/aggregate/unit_core_script_server.t
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/t/aggregate/unit_core_script_server.t 2010-01-14 03:49:27 UTC (rev 12635)
+++ Catalyst-Runtime/5.80/branches/psgi/t/aggregate/unit_core_script_server.t 2010-01-14 04:02:47 UTC (rev 12636)
@@ -91,6 +91,8 @@
shift @TestAppToTestScripts::RUN_ARGS;
my $server = shift @TestAppToTestScripts::RUN_ARGS;
like ref($server), qr/^Plack::Server/, 'Is a Plack Server';
+ # Mangle argv into the options..
+ $resultarray->[-1]->{argv} = $argstring;
is_deeply \@TestAppToTestScripts::RUN_ARGS, $resultarray, "is_deeply comparison " . join(' ', @$argstring);
}
Modified: Catalyst-Runtime/5.80/branches/psgi/t/aggregate/unit_load_catalyst_test.t
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/t/aggregate/unit_load_catalyst_test.t 2010-01-14 03:49:27 UTC (rev 12635)
+++ Catalyst-Runtime/5.80/branches/psgi/t/aggregate/unit_load_catalyst_test.t 2010-01-14 04:02:47 UTC (rev 12636)
@@ -3,9 +3,7 @@
use strict;
use warnings;
-use FindBin;
-use lib "$FindBin::Bin/../lib";
-use Test::More tests => 61;
+use Test::More;
use FindBin qw/$Bin/;
use lib "$Bin/../lib";
use Catalyst::Utils;
@@ -26,7 +24,7 @@
### make sure we're not trying to connect to a remote host -- these are local tests
local $ENV{CATALYST_SERVER};
-use_ok( $Class );
+use Catalyst::Test ();
### check available methods
{ ### turn of redefine warnings, we'll get new subs exported
@@ -155,3 +153,4 @@
request(GET('/dummy'), []);
} 'array additional param to request method ignored';
+done_testing;
More information about the Catalyst-commits
mailing list