Comment 0 for bug 1407504

Revision history for this message
Dan Scott (denials) wrote :

* Evergreen master

I'm opening this bug despite being very much a part of the progression of the TPAC from a relatively simple initial rollout to the much more complex state it has found itself in as of 2.7. At this point, wading into misc_utils.tt2 requires some fearlessness; there's a ton of repetitive code and because of the difficulty in making Template::Toolkit code properly modular, it's pretty easy to overlook a dependency that some other chunk of code has. And one of the primary rationales for TT2 code is to be able to override template files with your own custom version. Doing that with misc_utils.tt2 isn't really a good idea.

In short, most of the 600 lines of misc_util.tt2, and perhaps the core parts of record/authors.tt2 and record/subjects.tt2, should be pulled back into the Perl modules--perhaps in OpenILS/WWW/EGCatLoader.pm and its children, or perhaps higher up so that the logic could be reused elsewhere. I suspect that would result in much less code that is easier to read, and it would facilitate access to database internals for the likes of config.metabib_field.