37 |
|
|
38 |
my $marc = new WebPAC::Input::MARC( |
my $marc = new WebPAC::Input::MARC( |
39 |
path => '/path/to/marc.iso', |
path => '/path/to/marc.iso', |
|
filter => \&code_ref, |
|
40 |
} |
} |
41 |
|
|
42 |
=cut |
=cut |
52 |
|
|
53 |
$log->info("opening MARC database '$arg->{path}'"); |
$log->info("opening MARC database '$arg->{path}'"); |
54 |
|
|
55 |
|
die "no filter support any more!" if $arg->{filter}; |
56 |
|
|
57 |
my $db = new MARC::Fast( |
my $db = new MARC::Fast( |
58 |
marcdb => $arg->{path}, |
marcdb => $arg->{path}, |
59 |
hash_filter => $arg->{filter}, |
hash_filter => sub { |
60 |
|
my ( $l, $nr ) = @_; |
61 |
|
Encode::decode( 'utf-8', $l ); |
62 |
|
}, |
63 |
); |
); |
64 |
my $db_size = $db->count - 1; # FIXME |
my $db_size = $db->count - 1; # FIXME |
65 |
|
|