You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Marc M. Adkins" <Pe...@Doorways.org> on 2007/07/07 20:13:49 UTC
Configuration Data vs. DirectoryIndex
I have been struggling with DirectoryIndex behavior and configuration
information from custom Perl directives for a while now. I've been
scanning the web and posting here and thanks for the previous responses.
I now have a solution that seems to work. I have extracted a minimal
set of tests that demonstrate the problem and my solution, which I have
attached as an archive (tar czf format).
I'm not completely happy with my solution, mostly because I'm not
completely sure why it works -- or perhaps more to the point why it is
necessary. I keep thinking that the mod_dir DirectoryIndex should "just
work" but of course that's bootless. Either it doesn't in this
situation or I don't understand something.
I'd be pleased to have a better solution. Or an explanation of why
this one works. I have tried to reduce the problem to the smallest
possible footprint to make it easy to review, for them what has the time
and interest.
Failing that, perhaps this IS a good solution and may benefit some other
poor soul.
Marc M. Adkins
Re: Configuration Data vs. DirectoryIndex
Posted by "Marc M. Adkins" <Pe...@Doorways.org>.
Well, ref($self) returns the package name for the $self object, which is
the class name passed into the call, which is 'Stuff'. I double-checked
by adding another warn() statement and re-running my test cases but it
all checked out. Unless I'm missing something.
Frank Wiles wrote:
> On Sat, 07 Jul 2007 11:13:49 -0700
> "Marc M. Adkins" <Pe...@Doorways.org> wrote:
>
>> I have been struggling with DirectoryIndex behavior and configuration
>> information from custom Perl directives for a while now. I've been
>> scanning the web and posting here and thanks for the previous
>> responses.
>>
>> I now have a solution that seems to work. I have extracted a minimal
>> set of tests that demonstrate the problem and my solution, which I
>> have attached as an archive (tar czf format).
>>
>> I'm not completely happy with my solution, mostly because I'm not
>> completely sure why it works -- or perhaps more to the point why it
>> is necessary. I keep thinking that the mod_dir DirectoryIndex should
>> "just work" but of course that's bootless. Either it doesn't in this
>> situation or I don't understand something.
>>
>> I'd be pleased to have a better solution. Or an explanation of why
>> this one works. I have tried to reduce the problem to the smallest
>> possible footprint to make it easy to review, for them what has the
>> time and interest.
>
>
> In your code you're calling:
>
> Apache2::Module::get_config( ref($self), .....other stuff....... )
>
> This isn't going to get you to pull in the right configuration
> module you built. I should be:
>
> Apache2::Module::get_config( 'Stuff', .... other stuff...... )
>
> At least, if I'm understanding your problem correctly.
>
> -------------------------------------------------------
> Frank Wiles, Revolution Systems, LLC.
> Personal : frank@wiles.org http://www.wiles.org
> Work : frank@revsys.com http://www.revsys.com
>
>
Re: Configuration Data vs. DirectoryIndex
Posted by Frank Wiles <fr...@wiles.org>.
On Sat, 07 Jul 2007 11:13:49 -0700
"Marc M. Adkins" <Pe...@Doorways.org> wrote:
> I have been struggling with DirectoryIndex behavior and configuration
> information from custom Perl directives for a while now. I've been
> scanning the web and posting here and thanks for the previous
> responses.
>
> I now have a solution that seems to work. I have extracted a minimal
> set of tests that demonstrate the problem and my solution, which I
> have attached as an archive (tar czf format).
>
> I'm not completely happy with my solution, mostly because I'm not
> completely sure why it works -- or perhaps more to the point why it
> is necessary. I keep thinking that the mod_dir DirectoryIndex should
> "just work" but of course that's bootless. Either it doesn't in this
> situation or I don't understand something.
>
> I'd be pleased to have a better solution. Or an explanation of why
> this one works. I have tried to reduce the problem to the smallest
> possible footprint to make it easy to review, for them what has the
> time and interest.
In your code you're calling:
Apache2::Module::get_config( ref($self), .....other stuff....... )
This isn't going to get you to pull in the right configuration
module you built. I should be:
Apache2::Module::get_config( 'Stuff', .... other stuff...... )
At least, if I'm understanding your problem correctly.
-------------------------------------------------------
Frank Wiles, Revolution Systems, LLC.
Personal : frank@wiles.org http://www.wiles.org
Work : frank@revsys.com http://www.revsys.com
Re: Configuration Data vs. DirectoryIndex
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Marc M. Adkins wrote:
> I have been struggling with DirectoryIndex behavior and configuration
> information from custom Perl directives for a while now. I've been
> scanning the web and posting here and thanks for the previous responses.
>
> I now have a solution that seems to work. I have extracted a minimal
> set of tests that demonstrate the problem and my solution, which I have
> attached as an archive (tar czf format).
>
> I'm not completely happy with my solution, mostly because I'm not
> completely sure why it works -- or perhaps more to the point why it is
> necessary. I keep thinking that the mod_dir DirectoryIndex should "just
> work" but of course that's bootless. Either it doesn't in this
> situation or I don't understand something.
>
> I'd be pleased to have a better solution. Or an explanation of why
> this one works. I have tried to reduce the problem to the smallest
> possible footprint to make it easy to review, for them what has the time
> and interest.
>
> Failing that, perhaps this IS a good solution and may benefit some other
> poor soul.
it's probably just a misunderstanding on your part. I'll take a look at
it, but I have absolutely no idea what your tarball actually does - that
it contains more than one .conf file is too complex for me to wade through.
try using this as a basis instead:
http://people.apache.org/~geoff/Apache-Test-skeleton-mp2.tar.gz
if you can have 'make test' issue a failure that can be easily verified
I'm pretty sure I can explain what's going on.
see also
http://marc.info/?l=apache-modperl&m=111335082632706&w=2
specifically
http://marc.info/?l=apache-modperl&m=111461643218624&w=2
HTH
--Geoff