Well then my next question then becomes: is it possible with mod_perl to hook into other modules' calls (I'm trying to not duplicate all of mod_access, merely change the return value)?
eg along the lines of:
sub handler { my $r = shift; if ($r->api_call('check_dir_access') == FORBIDDEN) { $r->headers_out->set(Location => $url); return REDIRECT; } return DECLINED; }
along with appropriate directives to override mod_access, <Location /> Deny from all PerlAccessHandler CTT::302 </Location>
(I know I'm grasping at straws by now, but... if the api call is exposeable, it becomes possible)
I would investigate other methods before trying this (such as the ideas Stas had), but the short answer is that yes, you can call core functions directly. see recipe 8.9 in the mod_perl developer's cookbook.
http://www.modperlcookbook.org/code/ch08/Cookbook/MIMEMagic.pm
Ah, sorry, I'm lost in the sea of methods -- I think we have exactly what you want. It should appear in here:
http://perl.apache.org/docs/2.0/api/Apache/HookRun.html
when I eventually get to document it, but for now see the example here:
http://perl.apache.org/docs/2.0/user/handlers/protocols.html#Command_Server
You are after run_access_checker which does exactly what you want.
Is that what you want?
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html