[Koha-bugs] [Bug 16140] Only clear L1 cache when needed

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 30 14:31:53 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16140

--- Comment #15 from Jacek Ablewicz <abl at biblos.pk.edu.pl> ---
I've tried to review GetMarcStructure() calls in the existing code as an
attempt to establish it's "safety level". As general rule, framework
hash-of-hashes-of hashes returned by GetMarcStructure() tends to be abused a
little bit here and there, we have a lot of statements like this

    $tagslib->{$fieldvalue}->{$subfvalue}->{'hidden'} || 0

i.e., this structure is prone to be messed up in many places, due to
autovivification of hash keys. However, if it is messed up everywhere in the
same, somehow predictable way, maybe it will be not such a big problem (?). But
there are places in the code where we do

    foreach my $field ( keys %$tagslib )
    foreach my $subfield ( sort( keys %{ $tagslib->{$tag} }

and so on, so adding { unsafe => 1 } to GetMarcStructure() certainly has quite
a bit of potential for introducting some hard-to-catch regressions, especially
under plack.

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


More information about the Koha-bugs mailing list