]> 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)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 26 Jul 2019 03:14:51 +0000 (03:14 +0000)
commitbf8f38ebce943e15ed2a11c97d8405f1011bf6f0
tree190f49bd1466f36f195e453f9ecfe1c0fc9d2e2c
parentbd2e6c6734fcefc84a88c484b4cbae741c423ed2
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>
(cherry picked from commit 6c208a09619d2326bfa608cd3afee343cd4f4c33)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/Plugins/Base.pm