[Catalyst-commits] r8273 - Catalyst-Runtime/5.70/trunk/lib/Catalyst
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Sun Aug 24 20:32:00 BST 2008
Author: rafl
Date: 2008-08-24 20:32:00 +0100 (Sun, 24 Aug 2008)
New Revision: 8273
Modified:
Catalyst-Runtime/5.70/trunk/lib/Catalyst/Controller.pm
Log:
Implement :Chained('../action').
Modified: Catalyst-Runtime/5.70/trunk/lib/Catalyst/Controller.pm
===================================================================
--- Catalyst-Runtime/5.70/trunk/lib/Catalyst/Controller.pm 2008-08-24 19:31:53 UTC (rev 8272)
+++ Catalyst-Runtime/5.70/trunk/lib/Catalyst/Controller.pm 2008-08-24 19:32:00 UTC (rev 8273)
@@ -285,6 +285,9 @@
if (defined($value) && length($value)) {
if ($value eq '.') {
$value = '/'.$self->action_namespace($c);
+ } elsif (my ($rest) = $value =~ /^\.{2}\/(.*)$/) {
+ my @parts = split '/', $self->action_namespace($c);
+ $value = '/'.join('/', @parts[0 .. $#parts-1], $rest);
} elsif ($value !~ m/^\//) {
my $action_ns = $self->action_namespace($c);
More information about the Catalyst-commits
mailing list