[Bps-public-commit] r16378 - in Path-Dispatcher/trunk: lib/Path/Dispatcher
sartak at bestpractical.com
sartak at bestpractical.com
Sun Oct 19 08:05:38 EDT 2008
Author: sartak
Date: Sun Oct 19 08:05:19 2008
New Revision: 16378
Modified:
Path-Dispatcher/trunk/ (props changed)
Path-Dispatcher/trunk/lib/Path/Dispatcher/Declarative.pm
Log:
r74159 at onn: sartak | 2008-10-19 08:04:51 -0400
Allow dispatchers to override the token delimiter
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 Sun Oct 19 08:05:19 2008
@@ -17,6 +17,8 @@
},
});
+sub token_delimiter { ' ' }
+
sub import {
my $self = shift;
my $pkg = caller;
@@ -103,6 +105,7 @@
my ($self, $tokens, $block) = @_;
Path::Dispatcher::Rule::Tokens->new(
tokens => $tokens,
+ delimiter => $self->token_delimiter,
$block ? (block => $block) : (),
),
},
@@ -124,6 +127,7 @@
my ($self, $tokens, $block) = @_;
Path::Dispatcher::Rule::Tokens->new(
tokens => [$tokens],
+ delimiter => $self->token_delimiter,
$block ? (block => $block) : (),
),
},
More information about the Bps-public-commit
mailing list