if ( my $p = $self->actions->{plain}->{$action} ) { return [$p] }
elsif ( my $r = $self->actions->{regex}->{$action} ) { return [$r] }
else {
- while ( my ( $regex, $name ) =
- each %{ $self->actions->{compiled} } )
- {
+ for my $regex ( keys %{ $self->actions->{compiled} } ) {
+ my $name = $self->actions->{compiled}->{$regex};
if ( $action =~ $regex ) {
my @snippets;
for my $i ( 1 .. 9 ) {
}
$c->prepare_request($r);
$c->prepare_path;
- my $path = $c->request->path;
- $c->log->debug(qq/Requested path "$path"/) if $c->debug;
$c->prepare_cookies;
$c->prepare_headers;
+ my $method = $c->req->method;
+ my $path = $c->req->path;
+ $c->log->debug(qq/"$method" request for "$path"/) if $c->debug;
$c->prepare_action;
$c->prepare_parameters;
+
+ if ( $c->debug && keys %{ $c->req->params } ) {
+ my @params;
+ for my $key ( keys %{ $c->req->params } ) {
+ my $value = $c->req->params->{$key} || '';
+ push @params, "$key=$value";
+ }
+ $c->log->debug( 'Parameters are "' . join( ' ', @params ) . '"' );
+ }
$c->prepare_uploads;
return $c;
}
$c->log->debug(qq/Requested action "$path"/) if $c->debug;
}
$c->req->match($path);
- $c->log->debug( 'Arguments are "' . join( '/', @args ) . '"' )
- if ( $c->debug && @args );
last;
}
unshift @args, pop @path;
$c->log->debug('Using default action') if $c->debug;
}
}
+ $c->log->debug( 'Arguments are "' . join( '/', @args ) . '"' )
+ if ( $c->debug && @args );
}
=head3 prepare_cookies;