[rt-users] webmux.pl needs tweak to work with mod_perl 2 and CGI.pm 2.92+

Max Bowsher maxb at ukf.net
Sun Oct 26 15:45:14 EST 2003


I set up rt-3.0.6 on Fedora 0.95, and discovered one small issue:

=========== Excerpt from webmux.pl ===========
use CGI qw(-private_tempfiles);

BEGIN {
    if ($CGI::MOD_PERL) {
        require HTML::Mason::ApacheHandler;
    }
    else {
        require HTML::Mason::CGIHandler;
    }
}
=================== END =======================

HTML::Mason::ApacheHandler uses Apache::Constants. On Apache 2, there is no
real Apache::Constants - Apache::compat must be used first, and it makes any
future "use Apache::Constants" a no-op.

CGI 2.91 and earlier will use Apache::compat on Apache 2.
CGI 2.92 and later do not use Apache::compat, and HTML::Mason::ApacheHandler
fails to load Apache/Constants.pm.

Warning - I've no previous experience with rt or mod_perl, but this fix
works for me:
Add:
        require Apache::compat if $CGI::MOD_PERL == 2;
before:
        require HTML::Mason::ApacheHandler;


Max.




More information about the rt-users mailing list