[Catalyst-commits] r7776 - in Catalyst-Runtime/5.70/trunk: . lib
lib/Catalyst t t/lib/TestApp/Controller/Action
bricas at dev.catalyst.perl.org
bricas at dev.catalyst.perl.org
Fri May 23 15:54:23 BST 2008
Author: bricas
Date: 2008-05-23 15:54:22 +0100 (Fri, 23 May 2008)
New Revision: 7776
Modified:
Catalyst-Runtime/5.70/trunk/Changes
Catalyst-Runtime/5.70/trunk/lib/Catalyst.pm
Catalyst-Runtime/5.70/trunk/lib/Catalyst/Action.pm
Catalyst-Runtime/5.70/trunk/lib/Catalyst/Runtime.pm
Catalyst-Runtime/5.70/trunk/t/lib/TestApp/Controller/Action/Forward.pm
Catalyst-Runtime/5.70/trunk/t/live_component_controller_action_forward.t
Log:
Fix regression for relative uri_for arguments after a forward() introduced in 5.7013 (Peter Karman)
Modified: Catalyst-Runtime/5.70/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.70/trunk/Changes 2008-05-23 12:46:43 UTC (rev 7775)
+++ Catalyst-Runtime/5.70/trunk/Changes 2008-05-23 14:54:22 UTC (rev 7776)
@@ -1,5 +1,9 @@
# This file documents the revision history for Perl extension Catalyst.
+5.7014 ---
+ - Fix regression for relative uri_for arguments after a forward()
+ introduced in 5.7013 (Peter Karman)
+
5.7013 2008-05-16 18:20:00
- Provide backwards compatability methods in Catalyst::Stats
- Fix subdirs for scripts that run in subdirs more than one level deep.
Modified: Catalyst-Runtime/5.70/trunk/lib/Catalyst/Action.pm
===================================================================
--- Catalyst-Runtime/5.70/trunk/lib/Catalyst/Action.pm 2008-05-23 12:46:43 UTC (rev 7775)
+++ Catalyst-Runtime/5.70/trunk/lib/Catalyst/Action.pm 2008-05-23 14:54:22 UTC (rev 7776)
@@ -38,7 +38,6 @@
sub dispatch { # Execute ourselves against a context
my ( $self, $c ) = @_;
- local $c->{namespace} = $self->namespace;
return $c->execute( $self->class, $self );
}
Modified: Catalyst-Runtime/5.70/trunk/lib/Catalyst/Runtime.pm
===================================================================
--- Catalyst-Runtime/5.70/trunk/lib/Catalyst/Runtime.pm 2008-05-23 12:46:43 UTC (rev 7775)
+++ Catalyst-Runtime/5.70/trunk/lib/Catalyst/Runtime.pm 2008-05-23 14:54:22 UTC (rev 7776)
@@ -7,7 +7,7 @@
# Remember to update this in Catalyst as well!
-our $VERSION='5.7013';
+our $VERSION='5.7014';
=head1 NAME
Modified: Catalyst-Runtime/5.70/trunk/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.70/trunk/lib/Catalyst.pm 2008-05-23 12:46:43 UTC (rev 7775)
+++ Catalyst-Runtime/5.70/trunk/lib/Catalyst.pm 2008-05-23 14:54:22 UTC (rev 7776)
@@ -34,8 +34,6 @@
qw/counter request response state action stack namespace stats/
);
-attributes->import( __PACKAGE__, \&namespace, 'lvalue' );
-
sub depth { scalar @{ shift->stack || [] }; }
# Laziness++
@@ -65,7 +63,7 @@
# Remember to update this in Catalyst::Runtime as well!
-our $VERSION = '5.7013';
+our $VERSION = '5.7014';
sub import {
my ( $class, @arguments ) = @_;
Modified: Catalyst-Runtime/5.70/trunk/t/lib/TestApp/Controller/Action/Forward.pm
===================================================================
--- Catalyst-Runtime/5.70/trunk/t/lib/TestApp/Controller/Action/Forward.pm 2008-05-23 12:46:43 UTC (rev 7775)
+++ Catalyst-Runtime/5.70/trunk/t/lib/TestApp/Controller/Action/Forward.pm 2008-05-23 14:54:22 UTC (rev 7776)
@@ -85,4 +85,9 @@
$c->forward(qw/TestApp class_forward_test_method/);
}
+sub forward_to_uri_check : Local {
+ my ( $self, $c ) = @_;
+ $c->forward( 'Action::ForwardTo', 'uri_check' );
+}
+
1;
Modified: Catalyst-Runtime/5.70/trunk/t/live_component_controller_action_forward.t
===================================================================
--- Catalyst-Runtime/5.70/trunk/t/live_component_controller_action_forward.t 2008-05-23 12:46:43 UTC (rev 7775)
+++ Catalyst-Runtime/5.70/trunk/t/live_component_controller_action_forward.t 2008-05-23 14:54:22 UTC (rev 7776)
@@ -10,7 +10,7 @@
BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
-use Test::More tests => 47 * $iters;
+use Test::More tests => 50 * $iters;
use Catalyst::Test 'TestApp';
if ( $ENV{CAT_BENCHMARK} ) {
@@ -235,4 +235,15 @@
'Test Method' );
}
+ # test uri_for re r7385
+ {
+ ok( my $response = request(
+ 'http://localhost/action/forward/forward_to_uri_check'),
+ 'forward_to_uri_check request');
+
+ ok( $response->is_success, 'forward_to_uri_check successful');
+ is( $response->content, 'http://localhost/action/forward/foo/bar',
+ 'forward_to_uri_check correct namespace');
+ }
+
}
More information about the Catalyst-commits
mailing list