Stas Bekman wrote:
dorian wrote:
is there currently a prescribed method for accessing the "current" configuration for a request, i.e., after all the merges have been done, at the particular stage a request is in? that is, if i want to access the current valid DirectoryIndex when a PerlTypeHandler is called, after possible VirtualHost, Location, Directory and .htaccess have been merged? i tried Apache::Directive, but that seems to more or less just give me the conf as it was written.
If I remember correctly it was Doug and Philippe who wrote Apache::Directive. I didn't have a chance to play with it yet. I understand that what you are after is some merge method which will show you the values after the merge. Philippe, can we do that?
We can't really do that. The configuration tree is accessible thru Apache::Directive in it's expanded state. But as far as 'merging' them together to get effective configuration for, say '/foobar' is not really possible, IMO.
Remember that each C apache module keeps it's own configuration data structure
and is free to merge it as it sees fit. So, from the perl land, even if we
could trigger configuration merging for a given url, there would be no way
to make sense of the data in each module's configuration data (effectively
just a bunch of void *)
OK, can you please paste that verbotim somewhere in the Apache/Directive.pod description?
I know you can do:
$r->location_merge('container_string');
which forces an earlier merge, but I'm not sure it'll affect the conf tree shown by Apache::Directive.
Nah, it doesn't.
Have you tried looking at the C code to see whether there is a C API for that?
The only suggested way to achieve something like that is to piggyback configuration
directive. If you have a module that wants to know the value of DirectoryIndex, for
instance, you could implement a mod_perl handler that supports a DirectoryIndex
directive, and return DECLINED, passing it back to mod_autoindex. That module would
need to merge directory indexes in the same way mod_autoindex does it, but that's the
core of the problem.
and that too :) Thanks Philippe!
BTW, while we are at it, what are we using the Apache::ConfVector for? I see it being returned by several methods, but there is no class to actually do anything with it. e.g. in Apache::ServerRec we have these two:
=head2 C<lookup_defaults> =head2 C<module_config>
I can't quite document those since I've never used them and I can't find any examples of their usage and they aren't tested.
-- __________________________________________________________________ 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