[Bps-public-commit] r17947 - in Path-Dispatcher/trunk: lib/Path/Dispatcher
sartak at bestpractical.com
sartak at bestpractical.com
Wed Jan 28 01:25:43 EST 2009
Author: sartak
Date: Wed Jan 28 01:25:42 2009
New Revision: 17947
Modified:
Path-Dispatcher/trunk/ (props changed)
Path-Dispatcher/trunk/lib/Path/Dispatcher/Declarative.pm
Log:
r79159 at onn: sartak | 2009-01-28 01:23:56 -0500
Pass $stage to rule_creators
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 Wed Jan 28 01:25:42 2009
@@ -126,7 +126,7 @@
my %rule_creators = (
ARRAY => sub {
- my ($self, $tokens, $block) = @_;
+ my ($self, $stage, $tokens, $block) = @_;
my $case_sensitive = $self->case_sensitive_tokens;
Path::Dispatcher::Rule::Tokens->new(
@@ -137,21 +137,21 @@
),
},
CODE => sub {
- my ($self, $matcher, $block) = @_;
+ my ($self, $stage, $matcher, $block) = @_;
Path::Dispatcher::Rule::CodeRef->new(
matcher => $matcher,
$block ? (block => $block) : (),
),
},
Regexp => sub {
- my ($self, $regex, $block) = @_;
+ my ($self, $stage, $regex, $block) = @_;
Path::Dispatcher::Rule::Regex->new(
regex => $regex,
$block ? (block => $block) : (),
),
},
empty => sub {
- my ($self, $undef, $block) = @_;
+ my ($self, $stage, $undef, $block) = @_;
Path::Dispatcher::Rule::Empty->new(
$block ? (block => $block) : (),
),
@@ -176,7 +176,7 @@
$rule_creator or die "I don't know how to create a rule for type $matcher";
- return $rule_creator->($self, $matcher, $block);
+ return $rule_creator->($self, $stage, $matcher, $block);
}
sub _add_rule {
More information about the Bps-public-commit
mailing list