]> git.koha-community.org Git - koha.git/commit
Bug 23230: Make _version_compare OO context aware
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 1 Jul 2019 14:42:51 +0000 (11:42 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 25 Jul 2019 13:12:59 +0000 (15:12 +0200)
commit6c208a09619d2326bfa608cd3afee343cd4f4c33
tree57be95b68adbb5c4e704f39832a0e255c9aede1b
parent5232a6263932556eaa3220f4b771c16c7a735b3c
Bug 23230: Make _version_compare OO context aware

On using _version_compare in plugins development, it would be nice if it
was able to be called as an object method. This way we don't need to
fully qualify it like this:

    Koha::Plugins::Base::_version_compare

and we can do

    $self->_version_compare

instead.

This patch implements this behavior change. It is backwards compatible
so plugins using the 'old way' don't break.

To test:
- Apply the unit tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Plugins.t
=> FAIL: Tests fail
- Apply this patch
- Run:
 k$ prove t/db_dependent/Plugins.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 90acef7a9b860e70631ff243c21b435a7d081a16)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/Plugins/Base.pm