Fix bad array hook in PSGI::Router
This commit is contained in:
parent
14495b0445
commit
766042c3bd
|
@ -10,9 +10,10 @@ extends 'Lemonldap::NG::Common::PSGI';
|
||||||
|
|
||||||
# Properties
|
# Properties
|
||||||
has 'routes' => (
|
has 'routes' => (
|
||||||
is => 'rw',
|
is => 'rw',
|
||||||
isa => 'HashRef',
|
isa => 'HashRef',
|
||||||
default => sub { { GET => {}, POST => {}, PUT => {}, PATCH => {}, DELETE => {} } }
|
default =>
|
||||||
|
sub { { GET => {}, POST => {}, PUT => {}, PATCH => {}, DELETE => {} } }
|
||||||
);
|
);
|
||||||
has 'defaultRoute' => ( is => 'rw', default => 'index.html' );
|
has 'defaultRoute' => ( is => 'rw', default => 'index.html' );
|
||||||
|
|
||||||
|
@ -75,7 +76,7 @@ sub genRoute {
|
||||||
elsif ( $t eq 'ARRAY' ) {
|
elsif ( $t eq 'ARRAY' ) {
|
||||||
$routes->{$word} ||= {};
|
$routes->{$word} ||= {};
|
||||||
foreach my $w ( @{$dest} ) {
|
foreach my $w ( @{$dest} ) {
|
||||||
$self->genRoute( $routes->{$word}, $w, $transform );
|
$self->genRoute( $routes->{$word}, $w, $w, $transform );
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user