XML::LibXML::Simple will return {} for an empty field. We need to
check this on barcode input, at least, and undef the variable. This
is done in the base class find_user_barcode and find_item_barcode
methods.
Signed-off-by: Jason Stephenson <jason@sigio.com>
}
}
+ # Because XML::LibXML::Simple returns {} for empty text values.
+ undef($barcode) if (ref($barcode) eq 'HASH' && !%{$barcode});
+
return (wantarray) ? ($barcode, $field) : $barcode;
}
next unless ($input->{ItemIdentifierType} =~ /barcode/i);
}
$barcode = $input->{ItemIdentifierValue};
+ # Because XML::LibXML::Simple returns {} for empty text values.
+ undef($barcode) if (ref($barcode) eq 'HASH' && !%{$barcode});
last if ($barcode);
}
}