From 766042c3bd970a08dbad4a34fb7cb2e9ef0a4329 Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Tue, 28 Jan 2020 15:27:39 +0100 Subject: [PATCH] Fix bad array hook in PSGI::Router --- .../lib/Lemonldap/NG/Common/PSGI/Router.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm index 3d59a5c3c..cbf22d4eb 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm @@ -10,9 +10,10 @@ extends 'Lemonldap::NG::Common::PSGI'; # Properties has 'routes' => ( - is => 'rw', - isa => 'HashRef', - default => sub { { GET => {}, POST => {}, PUT => {}, PATCH => {}, DELETE => {} } } + is => 'rw', + isa => 'HashRef', + default => + sub { { GET => {}, POST => {}, PUT => {}, PATCH => {}, DELETE => {} } } ); has 'defaultRoute' => ( is => 'rw', default => 'index.html' ); @@ -75,7 +76,7 @@ sub genRoute { elsif ( $t eq 'ARRAY' ) { $routes->{$word} ||= {}; foreach my $w ( @{$dest} ) { - $self->genRoute( $routes->{$word}, $w, $transform ); + $self->genRoute( $routes->{$word}, $w, $w, $transform ); } return; }