Browse files

dispatch_ruleメソッドをちょいと変更

  • Loading branch information...
1 parent 8d18d3b commit de5884cc24867aef68d838bb18f740c3e8931a2a @nekokak committed Feb 10, 2010
Showing with 6 additions and 2 deletions.
  1. +5 −1 lib/Kamui/Web/Context.pm
  2. +1 −1 lib/Kamui/Web/Handler.pm
View
6 lib/Kamui/Web/Context.pm
@@ -66,7 +66,11 @@ sub res {
};
}
-sub dispatch_rule { $_[0]->{dispatch_rule} }
+sub dispatch_rule {
+ my ($self, $rule) = @_;
+ $self->{dispatch_rule} = $rule if $rule;
+ $self->{dispatch_rule};
+}
sub fillin_fdat {
my ($self, $val) = @_;
View
2 lib/Kamui/Web/Handler.pm
@@ -88,7 +88,7 @@ sub handler {
app => $self,
);
my $rule = $self->dispatcher->determine($context);
- $context->{dispatch_rule} = $rule; # FIXME: ugly code
+ $context->dispatch_rule($rule);
$context->initialize();
my $response = $self->dispatch($context);

0 comments on commit de5884c

Please sign in to comment.