[Bps-public-commit] r15448 - in Path-Dispatcher/trunk: lib/Path lib/Path/Dispatcher
sartak at bestpractical.com
sartak at bestpractical.com
Mon Aug 25 16:57:48 EDT 2008
Author: sartak
Date: Mon Aug 25 16:57:47 2008
New Revision: 15448
Modified:
Path-Dispatcher/trunk/ (props changed)
Path-Dispatcher/trunk/lib/Path/Dispatcher.pm
Path-Dispatcher/trunk/lib/Path/Dispatcher/Dispatch.pm
Log:
r70326 at onn: sartak | 2008-08-25 16:57:42 -0400
Support multiple dispatches when we redispatch (for plugins or MI)
Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher.pm (original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher.pm Mon Aug 25 16:57:47 2008
@@ -83,7 +83,7 @@
}
}
- $dispatch->add_redispatch($self->redispatch($path))
+ $dispatch->add_redispatches($self->redispatches($path))
if $self->can_redispatch;
return $dispatch;
@@ -123,7 +123,7 @@
sub can_redispatch { shift->has_super_dispatcher }
-sub redispatch {
+sub redispatches {
my $self = shift;
my $path = shift;
Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher/Dispatch.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher/Dispatch.pm (original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher/Dispatch.pm Mon Aug 25 16:57:47 2008
@@ -19,12 +19,14 @@
},
);
-sub add_redispatch {
- my $self = shift;
- my $dispatch = shift;
-
- for my $match ($dispatch->matches) {
- $self->add_match($match);
+sub add_redispatches {
+ my $self = shift;
+ my @dispatches = @_;
+
+ for my $dispatch (@dispatches) {
+ for my $match ($dispatch->matches) {
+ $self->add_match($match);
+ }
}
}
More information about the Bps-public-commit
mailing list