1 package WebPAC::Input::ISIS;
11 WebPAC::Input::ISIS - support for CDS/ISIS database files
19 our $VERSION = '0.06';
24 Open CDS/ISIS, WinISIS or IsisMarc database using C<Biblio::Isis>
25 and read all records to memory.
27 my $isis = new WebPAC::Input::ISIS();
28 $isis->open( path => '/path/to/ISIS/ISIS' );
34 Returns handle to database and size in records
36 my ($db,$size) = $isis->open_db(
37 path => '/path/to/LIBRI'
39 my ($l,$field_nr) = @_;
40 # do something with $l which is line of input file
51 path to CDS/ISIS database
62 my $log = $self->_get_logger();
64 $log->info("opening ISIS database '$arg->{path}'");
66 $log->debug("using Biblio::Isis");
67 my $isis_db = new Biblio::Isis(
68 isisdb => $arg->{path},
70 hash_filter => $arg->{filter} ? sub { return $arg->{filter}->(@_); } : undef,
71 ) or $log->logdie("can't find database $arg->{path}");
73 my $size = $isis_db->count;
75 return ($isis_db, $size);
80 Return record with ID C<$mfn> from database
82 my $rec = $self->fetch_rec( $db, $mfn, $filter_coderef);
89 my ($isis_db, $mfn, $filter_coderef) = @_;
91 my $rec = $isis_db->to_hash({
93 include_subfields => 1,
94 hash_filter => $filter_coderef,
95 # hash_filter => sub {
97 # warn "## in hash_filter ($l,$f)\n";
98 # my $o = $filter_coderef->($l,$f) if ($filter_coderef);
99 # warn "## out hash_filter = $o\n";
109 Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>
111 =head1 COPYRIGHT & LICENSE
113 Copyright 2005 Dobrica Pavlinusic, All Rights Reserved.
115 This program is free software; you can redistribute it and/or modify it
116 under the same terms as Perl itself.
120 1; # End of WebPAC::Input::ISIS