[Koha-bugs] [Bug 9453] Update records acording to the new UNIMARCField100Language system preference

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Aug 22 13:46:38 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453

M. de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA

--- Comment #10 from M. de Rooy <m.de.rooy at rijksmuseum.nl> ---
KOHA -> Koha ?

Just a few questions:

1) What about:
    use FindBin;
    my $module="$FindBin::Bin/../kohalib.pl";
    eval { require $module };
Seems to overcome the warning:
"require" statement with library name as string at line 26, column 12. Use a
bareword instead.

2) You want to modify pos 22-24 (Language of cataloging).
You do that by:
$subfield =~ s/fre/$default_unimarc_language/g
Why global? You only want to do this once?
Since there actually is no check on the contents of the preference, this
variable may contain a string that is too short or too long. In that case you
are shifting characters in field 100 and corrupting your data. Could you check
the length? And simply replace positions 22-24? 
Also note that fre is hardcoded here. I would favor moving it to a script
parameter.
Looking at the code of ModBiblioMarc, I wonder if you need this regexp at all.
The code there appears to correct the language in 100a while checking the
length! 

3) Why use ModBiblioMarc and not ModBiblio?  See POD comment for ModBiblioMarc.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list