[Bps-public-commit] r16623 - in Path-Dispatcher/trunk: lib/Path/Dispatcher
sartak at bestpractical.com
sartak at bestpractical.com
Thu Oct 30 00:29:47 EDT 2008
Author: sartak
Date: Thu Oct 30 00:29:46 2008
New Revision: 16623
Modified:
Path-Dispatcher/trunk/ (props changed)
Path-Dispatcher/trunk/lib/Path/Dispatcher/Declarative.pm
Log:
r74860 at onn: sartak | 2008-10-30 00:28:52 -0400
Allow a declarative dispatcher to decide whether it wants its token-rules to be case sensitive
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 Thu Oct 30 00:29:46 2008
@@ -18,6 +18,7 @@
});
sub token_delimiter { ' ' }
+sub case_sensitive_tokens { undef }
sub import {
my $self = shift;
@@ -113,9 +114,12 @@
my %rule_creator = (
ARRAY => sub {
my ($self, $tokens, $block) = @_;
+ my $case_sensitive = $self->case_sensitive_tokens;
+
Path::Dispatcher::Rule::Tokens->new(
tokens => $tokens,
delimiter => $self->token_delimiter,
+ defined $case_sensitive ? (case_sensitive => $case_sensitive) : (),
$block ? (block => $block) : (),
),
},
More information about the Bps-public-commit
mailing list