[Koha-bugs] [Bug 15494] Block renewals by arbitrary item values
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Jan 17 19:02:35 CET 2018
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15494
--- Comment #26 from Nick Clemens <nick at bywatersolutions.com> ---
(In reply to Marcel de Rooy from comment #21)
> + unless ($item) { carp "No item passed in!" && return }
> Not our preferred coding style
This was just copying others in this file, changed to "return unless $item"
> + return () if (! $yaml =~ /\S/ );
> Just return here.
Removed
> + eval {
> + $denyingrules = YAML::Load($yaml);
> + };
> How much time are we spending on doing this? What is the performance effect?
Was about .037 seconds (with 2 fields and 1000 values)
Using split is about .014 seconds, okay, I switched
> + return ();
Yup
> Why not in just one line: my $val = $item->{$field} // '';
Good point
>Why not just provide an example as close as possible to the pref itself?
Okay
> Just curious too if this supports denying renewal on an empty string? If so,
> the conversion from undef to empty string might not be what we want.
Okay, can use "" or NULL for specific now (see the pref explanation)
> Changing status. Please make some adjustments.
Improved, squashed, sent back for SO
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list