]> git.koha-community.org Git - koha.git/commit
Bug 13223: Plugin housekeeping: do not redefine wrapper
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 7 Nov 2014 14:45:08 +0000 (15:45 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 19 Nov 2014 16:28:08 +0000 (13:28 -0300)
commitc4a8e5fb3e8a40f44664a8103551c37534104053
tree3a518346958009e43506bc658a7e81b2cdfc49dd
parentc134e2111c59e386510ca4c72fec8a019bc5a48e
Bug 13223: Plugin housekeeping: do not redefine wrapper

This report is connected to bug 10480 which will change the general
mechanism of loading plugins, but can be tested independently and ahead
of that proposed change.

Several unimarc plugins use a wrapper sub. The code of this subroutine
is not exactly the same for all plugins: in some cases the routine is
extended for double character strings (dblspace and dblpipe). It would
not hurt to use the extended code for all plugins.

By moving the code to a module, we prevent redefinition
when two or more plugins are loading wrapper in a do-statement.

NOTE: You will not see wrapper redefine errors in your log, since the
plugins do not use the warnings pragma (yet). Since this patch touches
seventeen unimarc plugins, a unimarc signoff is preferred :)

Test plan:
Use some plugins changed in this patch (if not in use already).
Load the MARC editor.
Click on some tag editor-buttons to check unchanged behavior.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
               Unimarc plugins work as usual. No regression. Simple code
               factorization.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
18 files changed:
Koha/Util/FrameworkPlugin.pm [new file with mode: 0644]
cataloguing/value_builder/unimarc_field_100.pl
cataloguing/value_builder/unimarc_field_100_authorities.pl
cataloguing/value_builder/unimarc_field_105.pl
cataloguing/value_builder/unimarc_field_110.pl
cataloguing/value_builder/unimarc_field_115a.pl
cataloguing/value_builder/unimarc_field_115b.pl
cataloguing/value_builder/unimarc_field_116.pl
cataloguing/value_builder/unimarc_field_117.pl
cataloguing/value_builder/unimarc_field_120.pl
cataloguing/value_builder/unimarc_field_121a.pl
cataloguing/value_builder/unimarc_field_125b.pl
cataloguing/value_builder/unimarc_field_126a.pl
cataloguing/value_builder/unimarc_field_128b.pl
cataloguing/value_builder/unimarc_field_130.pl
cataloguing/value_builder/unimarc_field_135a.pl
cataloguing/value_builder/unimarc_field_140.pl
cataloguing/value_builder/unimarc_leader.pl