Bug 17091: Add AUTOLOAD to Koha::Objects
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 9 Aug 2016 14:46:11 +0000 (15:46 +0100)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Tue, 11 Oct 2016 03:43:15 +0000 (03:43 +0000)
commit6a2a15aae803997cb9f090a59e893a7242d56923
tree8fe2dc2948a11080cffc13b5232cfa23fa23bfa8
parentdf3df9cf7199c464565742af59bd48006d93cfdf
Bug 17091: Add AUTOLOAD to Koha::Objects

Up to now if a Koha::Objects based object needs to call DBIx::Class methods, we
have to create a new method for Koha::Objects, something like:
  sub method {
    my $self = shift;
    return $self->_resultset->method
  }

To simplify and ease the call to DBIx::Class method, this patch defines an
AUTOLOAD to call the DBIx::Class method on the resultset we are encapsulating.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Koha/Objects.pm