211 |
# placeholder for all repeatable entries for index |
# placeholder for all repeatable entries for index |
212 |
|
|
213 |
sub chk_eval($) { |
sub chk_eval($) { |
214 |
my $data = shift || return; |
my $data = shift; |
215 |
if ($data =~ s/eval{([^}]+)}//) { |
if ($data =~ s/eval{([^}]+)}//) { |
216 |
if (eval "$1") { |
if (eval "$1") { |
217 |
return $data; |
return $data; |
291 |
} |
} |
292 |
# type="swish" ; field for swish |
# type="swish" ; field for swish |
293 |
if ($swish) { |
if ($swish) { |
|
my $tmp; |
|
294 |
if ($filter && ($s || $se)) { |
if ($filter && ($s || $se)) { |
295 |
no strict 'refs'; |
no strict 'refs'; |
296 |
my $tmp = join(" ",&$filter($swish)) if ($s || $se); |
my $tmp = join(" ",&$filter($swish)) if ($s || $se); |
297 |
|
$swish_data .= $tmp if ($s); |
298 |
|
$swish_exact_data .= "xxbxx $tmp xxexx " if ($se && $tmp ne ""); |
299 |
|
|
300 |
} else { |
} else { |
301 |
$tmp = $swish; |
$swish_data .= $swish if ($s); |
302 |
|
$swish_exact_data .= "xxbxx $swish xxexx " if ($se && $swish ne ""); |
303 |
} |
} |
|
|
|
|
$tmp = chk_eval($tmp); |
|
|
$swish_data .= $tmp if ($s); |
|
|
$swish_exact_data .= "xxbxx $tmp xxexx " if ($se && $tmp ne ""); |
|
304 |
} |
} |
305 |
|
|
306 |
# type="display" ; field for display |
# type="display" ; field for display |
740 |
print STDERR "\n"; |
print STDERR "\n"; |
741 |
|
|
742 |
} elsif ($type_base eq "excel") { |
} elsif ($type_base eq "excel") { |
743 |
use Spreadsheet::ParseExcel; |
require Spreadsheet::ParseExcel; |
744 |
use Spreadsheet::ParseExcel::Utility qw(int2col); |
require Spreadsheet::ParseExcel::Utility; |
745 |
|
import Spreadsheet::ParseExcel::Utility qw(int2col); |
746 |
|
|
747 |
$import2cp = Text::Iconv->new($config->{excel_codepage},$codepage); |
$import2cp = Text::Iconv->new($config->{excel_codepage},$codepage); |
748 |
my $excel_file = $cfg -> val($database, 'excel_file') || die "$database doesn't have 'excel_file' defined!"; |
my $excel_file = $cfg -> val($database, 'excel_file') || die "$database doesn't have 'excel_file' defined!"; |
796 |
} |
} |
797 |
} elsif ($type_base eq "marc") { |
} elsif ($type_base eq "marc") { |
798 |
|
|
799 |
use MARC; |
require MARC; |
800 |
|
|
801 |
$import2cp = Text::Iconv->new($config->{marc_codepage},$codepage); |
$import2cp = Text::Iconv->new($config->{marc_codepage},$codepage); |
802 |
my $marc_file = $cfg -> val($database, 'marc_file') || die "$database doesn't have 'marc_file' defined!"; |
my $marc_file = $cfg -> val($database, 'marc_file') || die "$database doesn't have 'marc_file' defined!"; |