[Koha-bugs] [Bug 16685] Use eval instead of do for .perl atomicupdates
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Aug 23 12:18:10 CEST 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16685
Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #54729|0 |1
is obsolete| |
Attachment #54730|0 |1
is obsolete| |
--- Comment #11 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 54758
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54758&action=edit
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 at hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list