Can't locate object method "is_initial_req" via package "Apache::AuthDBI"

Andrea Brugiolo <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <[email protected]>
Dear all,

firts of all, I have already looked up this error on the net and I
have found some, quite obvious, hints ⁽¹⁾ but they unfortunately don't
help.

The problem is Apache::AuthDBI uses method is_initial_req from the
Apache2::RequestUtil package but this method is not recognized as a
method of the Apache2::RequestUtil package.

Actually, Apache::AuthDBI does *require* Apache2::RequestUtil, at
least for mod_perl2, which is what I am using.

The offendine line is n. 217 in AuthDBI.pm:

216    return MP2 ? Apache2::Const::OK() : Apache::Constants::OK()
217        unless $r->is_initial_req; # only the first internal request

When I use DBI for authentication my Apache yelds:

    Can't locate object method "is_initial_req" via package "Apache::AuthDBI" at /usr/lib/perl5/Apache/AuthDBI.pm line 217

So I tried to call the method explicitly, adding to AuthDBI.pm:

    use Apache2::RequestUtil qw(is_initial_req);

and/or:

    unless $r->Apache2::RequestUtil::is_initial_req;

but in this case Apache said:

    Can't locate object method "is_initial_req" via package "Apache2::RequestUtil" at /usr/lib/perl5/Apache/AuthDBI.pm line 217  

Last note: I have been using my same code and DBI authentication for
years with mod_perl1 and everything was OK.

Other information:

 - I'm running on Debian
 - Apache 2.2.22
 - mod_perl2 2.0.7
 - DBI 1.11

Have you any idea?

Thank you very much in advance!

Andrea


Notes
-----
(1) Eg. http://marc.info/?l=apache-modperl-dev&m=129667924220797

-- 

  Noi siamo poveri perche' siamo onesti
  
                       -- Cane Rosso
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.