]> git.evergreen-ils.org Git - working/NCIPServer.git/blob - lib/NCIP/Handler.pm
Continuing with work for the LookupUser method
[working/NCIPServer.git] / lib / NCIP / Handler.pm
1 package NCIP::Handler;
2 #
3 #===============================================================================
4 #
5 #         FILE: Hander.pm
6 #
7 #  DESCRIPTION:
8 #
9 #        FILES: ---
10 #         BUGS: ---
11 #        NOTES: ---
12 #       AUTHOR: Chris Cormack (rangi), chrisc@catalyst.net.nz
13 # ORGANIZATION: Koha Development Team
14 #      VERSION: 1.0
15 #      CREATED: 19/09/13 10:43:14
16 #     REVISION: ---
17 #===============================================================================
18
19 use Modern::Perl;
20 use Object::Tiny qw{ type namespace ils };
21 use Module::Load;
22
23 sub new {
24     my $class    = shift;
25     my $params   = shift;
26     my $subclass = __PACKAGE__ . "::" . $params->{type};
27     load $subclass || die "Can't load module $subclass";
28     my $self     = bless {
29         type      => $params->{type},
30         namespace => $params->{namespace},
31         ils       => $params->{ils}
32     }, $subclass;
33     return $self;
34 }
35
36 1;