]> git.koha-community.org Git - koha.git/commit
Bug 16685 - Use eval instead of do for .perl atomicupdates
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 7 Jun 2016 14:07:19 +0000 (14:07 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 9 Sep 2016 12:52:57 +0000 (12:52 +0000)
commit954ed8053490ed735429b0ca5efd9b6c00d832d5
tree7789bc03138be47f72e9ba690bc7c6a40e87dc5f
parent748ad2355ea3dd4e404ec664b0d50b544db179e6
Bug 16685 - Use eval instead of do for .perl atomicupdates

If we use eval instead of do for our .perl atomic update files, it will
allow developers to put in the exact code that should go into
updatedatabase.pl. The problem with do is that none of the variables
defined in updatadatabase.pl are available, whereas with eval they are.

Test Plan:
1) Apply this patch
2) Create a .perl file in atomicupdates with the following in it:
say "DBversion: $DBversion";
3) Run updatadatabase.pl
4) Note the output
5) Add a syntax error to your atomic update
6) Run updatedatabase.pl
7) Note the error is displayed

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
installer/data/mysql/updatedatabase.pl