# 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;
}
# 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
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!";
}
} 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!";