[Bps-public-commit] r16416 - in Path-Dispatcher/trunk: lib/Path lib/Path/Dispatcher t
sartak at bestpractical.com
sartak at bestpractical.com
Tue Oct 21 10:29:14 EDT 2008
Author: sartak
Date: Tue Oct 21 10:29:14 2008
New Revision: 16416
Removed:
Path-Dispatcher/trunk/t/008-super-dispatcher.t
Modified:
Path-Dispatcher/trunk/ (props changed)
Path-Dispatcher/trunk/lib/Path/Dispatcher.pm
Path-Dispatcher/trunk/lib/Path/Dispatcher/Declarative.pm
Log:
r74251 at onn: sartak | 2008-10-21 10:29:11 -0400
Remove super dispatchers, redispatching will simply be a rule type
Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher.pm (original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher.pm Tue Oct 21 10:29:14 2008
@@ -34,12 +34,6 @@
},
);
-has super_dispatcher => (
- is => 'rw',
- isa => 'Path::Dispatcher',
- predicate => 'has_super_dispatcher',
-);
-
sub dispatch {
my $self = shift;
my $path = shift;
@@ -54,9 +48,6 @@
);
}
- $dispatch->add_redispatches($self->redispatches($path))
- if $self->can_redispatch;
-
return $dispatch;
}
@@ -72,15 +63,6 @@
return 1;
}
-sub can_redispatch { shift->has_super_dispatcher }
-
-sub redispatches {
- my $self = shift;
- my $path = shift;
-
- return $self->super_dispatcher->dispatch($path)
-}
-
sub run {
my $self = shift;
my $path = shift;
@@ -157,15 +139,6 @@
A human-readable name; this will be used in the (currently nonexistent)
debugging hooks.
-=head2 super_dispatcher
-
-Another Path::Dispatcher to defer to when no rules match in the current
-dispatcher. This is intended for "subclassing" dispatchers, such as when you
-have a framework dispatcher and an application dispatcher.
-
-WARNING: The super dispatcher feature is currently unstable. I'm still trying
-to figure out the right way to have them.
-
=head1 METHODS
=head2 add_rule
Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher/Declarative.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher/Declarative.pm (original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher/Declarative.pm Tue Oct 21 10:29:14 2008
@@ -47,11 +47,6 @@
name => $into,
);
- # if this is a subclass, then we want to set up a super dispatcher
- if ($class ne __PACKAGE__) {
- $dispatcher->super_dispatcher($class->dispatcher);
- }
-
return {
dispatcher => sub { $dispatcher },
dispatch => sub {
More information about the Bps-public-commit
mailing list