# Copyright 2009 Kyle M. Hall <kyle.m.hall@gmail.com>
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
+
+
use Modern::Perl;
#use MARC::Record;
if ( ! ( $record && $fieldName ) ) { return; }
- if ( not $subfieldName or $subfieldName eq '' ) {
+ if ( not defined $subfieldName or $subfieldName eq '' ) {
# FIXME I'm not sure the actual implementation is correct.
die "This action is not implemented yet";
#_update_field({ record => $record, field => $fieldName, values => \@values });
my $subfieldName = $params->{subfield};
my $field_numbers = $params->{field_numbers} // [];
- if ( not $subfieldName or $subfieldName eq '' ) {
+ if ( not defined $subfieldName or $subfieldName eq '' ) {
_read_field({ record => $record, field => $fieldName, field_numbers => $field_numbers });
} else {
_read_subfield({ record => $record, field => $fieldName, subfield => $subfieldName, field_numbers => $field_numbers });