1 |
#!/usr/bin/perl -w |
#!/usr/bin/perl |
2 |
|
|
3 |
|
use warnings; |
4 |
|
use strict; |
5 |
|
|
6 |
use Net::Z3950::SimpleServer; |
use Net::Z3950::SimpleServer; |
7 |
use Net::Z3950::OID; |
use Net::Z3950::OID; |
8 |
use COBISS; |
use COBISS; |
|
use strict; |
|
9 |
|
|
10 |
my $max_records = 3; # XXX configure this |
my $max_records = 3; # XXX configure this |
11 |
my $max_result_sets = 10; |
my $max_result_sets = 10; |
46 |
|
|
47 |
my $setname = $this->{SETNAME}; |
my $setname = $this->{SETNAME}; |
48 |
my $repl_set = $this->{REPL_SET}; |
my $repl_set = $this->{REPL_SET}; |
49 |
|
diag "SETNAME $setname REPL_SET $repl_set"; |
50 |
my $result; |
my $result; |
51 |
unless ( $result = COBISS->search( $query ) ) { |
unless ( $result = COBISS->search( $query ) ) { |
52 |
$this->{ERR_CODE} = 108; |
$this->{ERR_CODE} = 108; |
160 |
|
|
161 |
package Net::Z3950::RPN::Term; |
package Net::Z3950::RPN::Term; |
162 |
|
|
163 |
|
use Data::Dump qw(dump); |
164 |
use COBISS; |
use COBISS; |
165 |
|
|
166 |
sub render { |
sub render { |
167 |
my $this = shift; |
my $this = shift; |
168 |
|
|
169 |
print "render ", $this; |
print "render ", dump($this); |
170 |
|
|
171 |
|
my $from = 'COBISS'; |
172 |
|
|
173 |
|
my $usemap = eval "${from}::usemap;"; |
174 |
|
warn "# $from usermap ",dump($usemap); |
175 |
|
|
176 |
my $attributes = {}; |
my $attributes = {}; |
177 |
my $prefix = ""; |
my $prefix = ""; |
181 |
$attributes->{$type} = $value; |
$attributes->{$type} = $value; |
182 |
} |
} |
183 |
if ( defined( my $use = $attributes->{1} ) ) { |
if ( defined( my $use = $attributes->{1} ) ) { |
184 |
if ( defined( my $field = COBISS::usemap($use) ) ) { |
if ( defined( my $field = $usemap->{$use} ) ) { |
185 |
$prefix = $field; |
$prefix = $field; |
186 |
} |
} |
187 |
else { |
else { |