Torsten Foertsch wrote: > Hi, > > I want to test a module that uses an Apache 2.2 feature. The module uses > response tests where the httpd configuration is written directly in the > test.pm. > > I need something like this: > > __END__ > <IfVersion >= 2.2.0> > AllowOverride AuthConfig Options=Indexes,FollowSymLinks > </IfVersion> > > Unfortunately, IfVersion is valid only from 2.0.56 on. Is there a workaround > in mod_perl or AT?
I understand what you're asking, but it's not there :) I take it that Options=Indexes is the problematic part? the only thing I can think of is using something like this <IfDefine APACHE2_2> ... </IfDefine> then using t/TEST.PL as a template (instead of the default generated t/TEST) and include logic something like this if (have_min_apache_version(2.2)) { Apache::TestRunPerl->new->run(@ARGV, '-defines', 'APACHE2_2'); } else { Apache::TestRunPerl->new->run(@ARGV); } or somesuch. you'll need to pull some additional trickery to actually get have_min_apache_version() to work but I think you get the idea :) --Geoff