]> git.koha-community.org Git - koha.git/commit
Bug 17755: Introduce Koha::Object::Limit::Library
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 12 Dec 2016 17:17:44 +0000 (14:17 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 24 Mar 2017 18:32:42 +0000 (18:32 +0000)
commitbd01041ac6985656ca1bf1f2a6b9d565e98bd61d
tree8d4044ccd4e309b72c69fb2ab2a773457b1db4a7
parent9c347a7f3571b36b8c3415e41cf567fa76f0ad56
Bug 17755: Introduce Koha::Object::Limit::Library

This patch introduces a new class for extending Koha::Object using
multiple inheritance. It cannot be used standalone, it needs to be
used in Koha::Object implementations like this:

use base qw( Koha::Object Koha::Object::Limit::Library );

Its goal is to provide a single way and place to deal with this common
pattern in Koha's codebase.

As it happened with Koha::Object, that needed to be tested in a real object
class, this work was done on top of Koha::Patron::Attribute::Type implementation
and it is fully covered by the tests that are introduced for it.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/Exceptions.pm
Koha/Object/Limit/Library.pm [new file with mode: 0644]