--- branches/hidra/all2xml.pl 2004/03/08 20:32:36 248 +++ branches/hidra/all2xml.pl 2004/03/08 21:10:02 249 @@ -211,7 +211,7 @@ # placeholder for all repeatable entries for index sub chk_eval($) { - my $data = shift || return; + my $data = shift; if ($data =~ s/eval{([^}]+)}//) { if (eval "$1") { return $data; @@ -291,17 +291,16 @@ } # type="swish" ; field for swish if ($swish) { - my $tmp; if ($filter && ($s || $se)) { no strict 'refs'; my $tmp = join(" ",&$filter($swish)) if ($s || $se); + $swish_data .= $tmp if ($s); + $swish_exact_data .= "xxbxx $tmp xxexx " if ($se && $tmp ne ""); + } else { - $tmp = $swish; + $swish_data .= $swish if ($s); + $swish_exact_data .= "xxbxx $swish xxexx " if ($se && $swish ne ""); } - - $tmp = chk_eval($tmp); - $swish_data .= $tmp if ($s); - $swish_exact_data .= "xxbxx $tmp xxexx " if ($se && $tmp ne ""); } # type="display" ; field for display @@ -741,8 +740,9 @@ print STDERR "\n"; } elsif ($type_base eq "excel") { - use Spreadsheet::ParseExcel; - use Spreadsheet::ParseExcel::Utility qw(int2col); + require Spreadsheet::ParseExcel; + require Spreadsheet::ParseExcel::Utility; + import Spreadsheet::ParseExcel::Utility qw(int2col); $import2cp = Text::Iconv->new($config->{excel_codepage},$codepage); my $excel_file = $cfg -> val($database, 'excel_file') || die "$database doesn't have 'excel_file' defined!"; @@ -796,7 +796,7 @@ } } elsif ($type_base eq "marc") { - use MARC; + require MARC; $import2cp = Text::Iconv->new($config->{marc_codepage},$codepage); my $marc_file = $cfg -> val($database, 'marc_file') || die "$database doesn't have 'marc_file' defined!";