]> git.koha-community.org Git - koha.git/commit
Bug 17302: Add Koha::Util::Normalize for normalization functions
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 14 Sep 2016 17:48:00 +0000 (14:48 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Sun, 25 Sep 2016 14:04:54 +0000 (14:04 +0000)
commitbbf2aff7d270905e7e21ccdc4d0729fe3e3586e8
tree8558a08029eb5571d31dbf0a00510aa505d450bd
parent7cb3a607d8a194268758889198db1b610b2beb85
Bug 17302: Add Koha::Util::Normalize for normalization functions

This patch introduces Koha::Util::Normalize, which includes the following normalization routines
that need no explanation:

- remove_spaces
- upper_case
- lower_case

and it also includes:

- legacy_default: which basically does what C4::Matcher::_normalize does.

All routines functionality are fully tested with the included in the included tests.

To test:
- Apply the patch
- Run:
  $ prove t/Koha/Util/Normalize.t
=> SUCCESS: All tests pass
- Sign off :-D

Edit: Added Exporter to explicitly export the routines.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/Util/Normalize.pm [new file with mode: 0644]
t/Koha/Util/Normalize.t [new file with mode: 0644]