foreach my $database ($cfg->Sections) {
+ # save database name in global variable path for later
+ # (need for index filter creation)
+ $path = $database;
+
my $type = lc($cfg -> val($database, 'type')) || die "$database doesn't have 'type' defined";
my $add_xml = $cfg -> val($database, 'xml'); # optional
$import2cp = Text::Iconv->new($config->{isis_codepage},$codepage);
my $db = new Biblio::Isis( isisdb => $isis_db );
- my $max_rowid = $db->count;
+ my $max_rowid = $db->count if ($db);
if (! $max_rowid) {
print STDERR "FATAL: can't read ISIS database: $isis_db, skipping...\n";
print STDERR "Reading database: $isis_db [$max_rowid rows]\n";
- $path = $database;
-
for (my $row_id = 1; $row_id <= $max_rowid; $row_id++ ) {
my $row = $db->to_hash( $row_id );
if ($row) {
print "Document-Type: XML\n\n$xml\n";
}
}
+
+ print STDERR "\n";
+
} elsif ($type_base eq "marc") {
require MARC::File::USMARC;