3 |
use warnings; |
use warnings; |
4 |
use strict; |
use strict; |
5 |
|
|
6 |
use MARC::Fast; |
use MARC::Fast 0.03; |
7 |
|
|
8 |
=head1 NAME |
=head1 NAME |
9 |
|
|
11 |
|
|
12 |
=head1 VERSION |
=head1 VERSION |
13 |
|
|
14 |
Version 0.04 |
Version 0.05 |
15 |
|
|
16 |
=cut |
=cut |
17 |
|
|
18 |
our $VERSION = '0.04'; |
our $VERSION = '0.05'; |
19 |
|
|
20 |
|
|
21 |
=head1 SYNOPSIS |
=head1 SYNOPSIS |
33 |
Returns handle to database |
Returns handle to database |
34 |
|
|
35 |
my $db = $open_db( |
my $db = $open_db( |
36 |
path => '/path/to/marc.iso' |
path => '/path/to/marc.iso', |
37 |
|
filter => \&code_ref, |
38 |
} |
} |
39 |
|
|
40 |
=cut |
=cut |
48 |
|
|
49 |
$log->info("opening MARC database '$arg->{path}'"); |
$log->info("opening MARC database '$arg->{path}'"); |
50 |
|
|
51 |
my $db = new MARC::Fast( marcdb => $arg->{path}); |
my $db = new MARC::Fast( |
52 |
|
marcdb => $arg->{path}, |
53 |
|
hash_filter => $arg->{filter}, |
54 |
|
); |
55 |
my $db_size = $db->count - 1; # FIXME |
my $db_size = $db->count - 1; # FIXME |
56 |
|
|
57 |
$self->{_marc_size} = $db_size; |
$self->{_marc_size} = $db_size; |