[Koha-bugs] [Bug 23230] Make Koha::Plugins::Base::_version_compare OO

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jul 1 16:45:58 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23230

--- Comment #3 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 91153
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91153&action=edit
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

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list