Bug#537692: libhtml-mason-perl: Apache::Constants::NOT_FOUND issue

Florian Schlichting fschlich at zedat.fu-berlin.de
Mon Sep 19 10:08:21 UTC 2011


Hi,

> mod_perl2 doesn't have an Apache::Constants module. A google says I
> should be using Apache2::Const::NOT_FOUND, but that one doesn't work
> either (both return a 500 to the browser when I try to access a private
> file)
> 
> 
> This is what I get in error_log:
> [Mon Jul 20 08:35:23 2009] [error] [client 192.168.1.9] failed to
> resolve handler `Apache2::Const::NOT_FOUND': Can't locate
> Apache2/Const/NOT_FOUND.pm in @INC (@INC contains: /etc/perl
> /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5
> /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
> /usr/local/lib/site_perl . /etc/apache2) at (eval 40) line 3.\n


the problem is that Apache2::Const will not export any symbol by
default, you've got to ask for it explicitly. Alas, the PerlModule
directive doesn't allow to name the symbols to export. It seems what's
needed is a <Perl> block like so:

    <Perl>
        use HTML::Mason::ApacheHandler;
        use Apache2::Const -compile => qw(HTTP_NOT_FOUND);
    </Perl>
    ...
    <LocationMatch "(\.m(html|txt|pl)|dhandler|autohandler)$">
            SetHandler perl-script
            PerlInitHandler Apache2::Const::NOT_FOUND
    </LocationMatch>

I'll update README.Debian accordingly unless someone knows of a better
approach.

Florian





More information about the pkg-perl-maintainers mailing list