If the TT stuff loads CGI w/o -utf8, that "instance" (not really instance)...
authorsenator <lebbeous@esilibrary.com>
Mon, 14 Mar 2011 21:48:25 +0000 (17:48 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 20 Jul 2011 18:34:07 +0000 (14:34 -0400)
commitbbe8b9b331a79f5db143baeccb17009e0fbfcfb2
treee4d4b8d93af3dfb666b0d63ae3c2e6ca17c46013
parent6c66f5caa526080710d981f4a78b174798acf553
If the TT stuff loads CGI w/o -utf8, that "instance" (not really instance)...

... will compete with use CGI in EGCatloader.pm. Really. Normally I enjoy
perl but the awful, horrendous, unspeakable black magic used in CGI.pm
has given me a great deal of trouble today.

Specifically, I could not really succeed in subclassing it. I had a kind
of half success before, but I could only really replace methods in my
subclass, but not call the methods unchanged from the original base
class (CGI).  This manifested in a bug where I had been using
the query_string() method preserve search terms across some pages, but
that method had stopped working since I introduced the CGI subclass.

In an attempt to fix that, I discovered this document
http://stein.cshl.org/WWW/CGI/#subclassing
and tried the advice therein, and several variations thereof, but
everything I produced caused mod_perl to consume memory until it keeled
over from OOM.

Finally, I discovered that I never really needed the subclass in the
first place, so long as 'use CGI' with no module parameters doesn't
happen in the same process as 'use CGI qw/-utf8/'.
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/CGI_utf8.pm [new file with mode: 0644]
Open-ILS/web/templates/default/opac/parts/header.tt2