https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10407
Pete Edwards <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #45 from Pete Edwards <[email protected]> --- This change has broken my 'to_marc' plugin. Prior to this patch stage-marc-import.pl would read the input file with this routine: while (<$fh>) { s/^\s+//; s/\s+$//; $marcrecord.=$_; } And the marcrecord string would end up getting passed to the to_marc function in my plugin. Perhaps I was not using this as expected but this allowed me to import an Excel (xls) file which my plugin parsed using Spreadsheet::ParseExcel and then read to generate Marc records to be staged. The changes now cause the file to be read in ImportBatch::RecordsFromISO2709File and Marc records added to an array which is passed to the to_marc function. The reading routine is: while (<IN>) { s/^\s+//; s/\s+$//; next unless $_; # skip if record has only whitespace, as might occur # if file includes newlines between each MARC record my ($marc_record, $charset_guessed, $char_errors) = MarcToUTF8Record($_, $marc_type, $encoding); push @marc_records, $marc_record; ... } So in my case I get an array of bad marc records. Two questions: 1. Was I doing something I shouldn't have been able to and this fix has not broken anything as sch - just done what it always intended? 2. Whatever the answer to the (1) it does seem to have changed the data being passed to to_marc from scalar to array - surely that could break other people's plugins? I have not been able to find much by way of documentation about to_marc plugins - am I missing something? -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
