[Bps-public-commit] r17389 - in Path-Dispatcher/trunk: lib/Path/Dispatcher t
sartak at bestpractical.com
sartak at bestpractical.com
Sat Dec 27 17:19:11 EST 2008
Author: sartak
Date: Sat Dec 27 17:19:11 2008
New Revision: 17389
Modified:
Path-Dispatcher/trunk/ (props changed)
Path-Dispatcher/trunk/lib/Path/Dispatcher/Declarative.pm
Path-Dispatcher/trunk/t/016-more-under.t
Log:
r77963 at onn: sartak | 2008-12-27 17:19:03 -0500
Revert that; tokens are more useful
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 Sat Dec 27 17:19:11 2008
@@ -153,8 +153,8 @@
},
'' => sub {
my ($self, $string, $block) = @_;
- Path::Dispatcher::Rule::Eq->new(
- string => $string,
+ Path::Dispatcher::Rule::Tokens->new(
+ tokens => [$string],
$block ? (block => $block) : (),
),
},
@@ -273,11 +273,11 @@
=item a string
This is taken to mean a single token; creates an
-L<Path::Dispatcher::Rule::Token> rule.
+L<Path::Dispatcher::Rule::Tokens> rule.
=item an array reference
-This is creates a L<Path::Dispatcher::Rule::Token> rule.
+This is creates a L<Path::Dispatcher::Rule::Tokens> rule.
=item a regular expression
Modified: Path-Dispatcher/trunk/t/016-more-under.t
==============================================================================
--- Path-Dispatcher/trunk/t/016-more-under.t (original)
+++ Path-Dispatcher/trunk/t/016-more-under.t Sat Dec 27 17:19:11 2008
@@ -9,17 +9,17 @@
package Under::Where;
use Path::Dispatcher::Declarative -base;
- under 'ticket ' => sub {
+ under 'ticket' => sub {
on 'create' => sub { push @calls, "ticket create" };
on 'update' => sub { push @calls, "ticket update" };
};
- under 'blog ' => sub {
- under 'post ' => sub {
+ under 'blog' => sub {
+ under 'post' => sub {
on 'create' => sub { push @calls, "create blog post" };
on 'delete' => sub { push @calls, "delete blog post" };
};
- under 'comment ' => sub {
+ under 'comment' => sub {
on 'create' => sub { push @calls, "create blog comment" };
on 'delete' => sub { push @calls, "delete blog comment" };
};
More information about the Bps-public-commit
mailing list