in reply to Apache2.4, mod_perl & PerlAuthzHandler

'Can't locate object method "requires" via package "Apache2::RequestRec"'

Misspelling? s/requires/require/.

Replies are listed 'Best First'.
Re^2: Apache2.4, mod_perl & PerlAuthzHandler
by IlyaS (Novice) on Mar 14, 2016 at 12:50 UTC

    No, it's about directive "requires" used to get a list of authorization requries
    $r->requires
    http://perl.apache.org/docs/2.0/api/Apache2/Access.html#C_requires_

    It's written in documentation about support of apache 2.4, so I thought I won't have any problems.

      Could you show the (minimum) code for a handler that is causing the error? I don't have access to a modperl installation today but someone else might see something.

        So I have apache 2.4 + mod_perl 2.0.9 (latest version including Apache 2.4 support as written on site)

        Apache 2.4 config (standart)

        PerlAuthenHandler auth::auth->authen_handler # <-- this works fine PerlAuthzHandler auth::auth->group_handler AuthType basic AuthName 'Restricted Area Access' require group group1

        module (PerlAuthzHandler) code

        sub group_handler { my ($self, $r) = @_; my $requires = $r->requires; ... <so I have a list of requries, connect to my db and check if this +user may pass> }

        Here
        http://perl.apache.org/docs/2.0/api/Apache2/Access.html#C_requires_
        described output of $r->requires