Skip to content

Commit

Permalink
made Mojolicious::Routes logging a little friendlier
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 14, 2012
1 parent f4cdc97 commit 967eeb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -2,6 +2,7 @@ This file documents the revision history for Perl extension Mojolicious.

2.62 2012-03-15 00:00:00
- Improved Mojo::IOWatcher exception handling a little.
- Improved Mojolicious::Routes logging.
- Improved documentation.
- Improved tests.

Expand Down
7 changes: 3 additions & 4 deletions lib/Mojolicious/Routes.pm
Expand Up @@ -310,7 +310,7 @@ sub websocket {
sub _dispatch_callback {
my ($self, $c, $field, $staging) = @_;
$c->stash->{'mojo.routed'}++;
$c->app->log->debug(qq/Dispatching callback./);
$c->app->log->debug(qq/Routing to a callback./);
my $continue = $field->{cb}->($c);
return !$staging || $continue ? 1 : undef;
}
Expand All @@ -322,9 +322,8 @@ sub _dispatch_controller {
return 1
unless my $app = $field->{app} || $self->_generate_class($field, $c);
my $method = $self->_generate_method($field, $c);
my $target = ref $app || $app;
$target .= "->$method" if $method;
$c->app->log->debug(qq/Dispatching "$target"./);
my $target = (ref $app || $app) . ($method ? "->$method" : '');
$c->app->log->debug(qq/Routing to "$target"./);

# Controller or application
return unless $self->_load_class($c, $app);
Expand Down

0 comments on commit 967eeb9

Please sign in to comment.