Stas Bekman wrote:
We have a problem with using the Apache::Test name, more correctly we have a problem with using the Apache/Test.pm filename. On platforms with case-insentive filesystems (winFU, Mac OS X) if mod_perl 1.x is installed, there is Apache/test.pm (notice the lower case 't'). So when you say 'use Apache::Test' it loads Apache::test. Boom, nothing works.

ok, so it's not like that I don't believe that this is an issue, but I don't believe you - if you have Apache/test.pm and you install 2.0 then Apache/Test.pm would replace the existing file, no? that's why Apache2 is around for all the mod_perl based stuff - to keep Apache::Filter from 2.0 from cloberring Apache::Filter from 1.0


if installing Apache::Test doesn't clobber Apache::test on case-insensitive installations, _that_ seems like a bug to me :)


There are several routes we can take to resolve this problem:

1. rename Apache::Test to something else. David Wheeler has proposed to use Apache::Tester (or even swap the sides: Test::Apache).

that seems ok (if you buy into the argument, anyway)


2. add a new package Apache::TestLoad which will deal with loading the right Apache::Test package, by replacing 'require Apache::Test' with search for 'Apache/Test.pm' in @INC and doing do $file; on the full path. That solves the problem, of loading the right file but you will have to replace all instances of 'use Apache::Test;' with 'use Apache::TestLoad;', but still using the functions from Apache::Test. Since they are all imported by default, this is not a big issue. It's just confusing that use 'Apache::TestLoad'.

yucko - use()ing Apache::TestLoad methods just doesn't seem right.

I can see a third possibility - installing Apache::Test relative to Apache2, that way there is no namespace collision and uses can control their destiny.

--Geoff




Reply via email to