[Koha-bugs] [Bug 9967] Authorized values are not Plack-compatible

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Apr 3 11:09:36 CEST 2014


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

Jacek Ablewicz <abl at biblos.pk.edu.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |abl at biblos.pk.edu.pl

--- Comment #10 from Jacek Ablewicz <abl at biblos.pk.edu.pl> ---
(In reply to Robin Sheat from comment #9)

1/ In AddAuthorisedValue() there is a call to flush_cache('AddAuthorisedValue')
instead of flush_cache('GetAuthorisedValue') - probably irrelevant.

2/ There are some Memoize and Memoize::Expire bugs reported in CPAN, perl monks
etc. which are still unresolved since last available version (1.03) was
published, e.g.: http://www.perlmonks.org/index.pl?node_id=1049426 .

3/ I'm wondering if memoizing GetAuthorisedValue is such a good idea in the
persistent environment.. Same thing for any subroutines which return references
of any kind - unless we are 100% sure than the result data structures are
always used in strictly read-only mode. Looks like it's not a case for
GetAuthorisedValue(): it returns reference to array of hashrefs, and it's
result is often passed directly to C4::Templates::param() in various scripts.
C4::Templates::output() will then traverse this result and utf8::encode() any
scalar values in the data structures. Subsequent GetAuthorisedValue() calls
will return the same, memoized arrayref but with contents which got possibly
altered by previous request. Not pretty :).

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


More information about the Koha-bugs mailing list