Bug 26434: Fix plugin dirs addition to @INC
authorFridolin Somers <fridolin.somers@biblibre.com>
Fri, 11 Sep 2020 14:03:28 +0000 (16:03 +0200)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Tue, 20 Oct 2020 21:14:31 +0000 (23:14 +0200)
commit6efd0a5704d246417d3a7b836b85a1e50437fd2a
treed927ca7dd35c4907933c9b29f5a3c6cffed052df
parenta2cbbb4e1d091d41b75700f153976e470b72e18d
Bug 26434: Fix plugin dirs addition to @INC

Plugin dirs defined in koha-conf.xml are added to @INC in order to compile perl code.
Looks like with plack those dirs are added several times.
This may lead to an error "INCLUDE_PATH exceeds 64 directories".

This bug was identified with Carrousel plugin : https://inlibro.com/instructions-carrousel/

Test plan :
1) Enable plack and plugins
2) Look at page about.pl : @INC contains one plugin dir 'var/lib/plugins'
3) Install plugin KitchenSink : https://github.com/bywatersolutions/koha-plugin-kitchen-sink
4) Dont apply patch
5) Use configure on KitchenSink
6) Look at page about.pl : @INC contains server plugin dir 'var/lib/plugins'
7) Apply patch and restart plack
8) Use configure on KitchenSink
9) Look at page about.pl : @INC contains one plugin dir 'var/lib/plugins'

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit dcdc72aee7d835c08ca3565a83a3dae7389a4f87)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit aaef04500654a997f722c17adff017a0a4687e8d)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 97a15fe1869dbdefcdb10f812a5adcb36becc7a7)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Koha/Plugins.pm
Koha/Plugins/Handler.pm