The initial (and only known) target for the importer is OCLC Connexion
exports, which export 1 record at a time, with each record ending with
the standard record separator. There is no end-of-file /
end-of-transmission indicator, so the while() loop always blocks and
fails on the timeout alarm after the first record is read.
Until a more flexible solution is in place, roll back support for
reading multiple records via STDIN. The original commit was
679506975f0efb6e2f6f17b0c19e3c53c5bfda44
Note, the feature being rolled back was not actually necessary to
implement the feature in the commit (file-based imports). It was just
an added bonus.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
local $SIG{ALRM} = sub { die "alarm\n" };
alarm $wait_time; # prevent accidental tie ups of backend processes
local $/ = "\x1D"; # MARC record separator
- while (my $newline = <STDIN>) {
- $data .= $newline;
- alarm $wait_time; # prevent accidental tie ups of backend processes
- }
+ $data = <STDIN>;
alarm 0;
};