]> git.evergreen-ils.org Git - working/Evergreen.git/commit
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)
committersenator <lebbeous@esilibrary.com>
Mon, 14 Mar 2011 21:48:25 +0000 (17:48 -0400)
commite576b2e34fb9f0dbeeb72b1ee93ea2955bd7cf9e
treede2b55f0cc41aac6f8e25057b2a8a706fcae84e9
parent4213b223849b7b4144d6658863b87adec77af135
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