]> git.evergreen-ils.org Git - working/NCIPServer.git/blob - lib/NCIP.pm
Adding more tests to NCIPServer.t
[working/NCIPServer.git] / lib / NCIP.pm
1 package NCIP;
2 use NCIP::Configuration;
3 use Modern::Perl;
4 use base qw(Class::Accessor);
5
6 sub new {
7     my $proto = shift;
8     my $class = ref $proto || $proto;
9     my $config_dir = shift;
10     my $self = {};
11     my $config = NCIP::Configuration->new($config_dir);
12     $self->{config} = $config;
13     return bless $self, $class;
14
15 }
16
17 sub process_request {
18     my $self = shift;
19     my $xml = shift;
20     
21     my $request_type = $self->handle_initiation($xml);
22     my $response = "<HTML> <HEAD> <TITLE>Hello There</TITLE> </HEAD> <BODY> <H1>Hello You Big JERK!</H1> Who would take this book seriously if the first eaxample didn't say \"hello world\"?  </BODY> </HTML>";
23
24     return $response;
25 }
26
27 sub handle_initiation {
28     my $self = shift;
29     my $xml = shift;
30
31     return('lookup_item');
32 }
33
34 1;