Carletto wrote:
Hi! Anyone has experience in testing an Apache module (mod_perl 2.0, of course) with custom configuration directives ? I'm talking about a module "packaged" (h2xs -AX -n Foo::Bar) and then tested (perl Makefile.PL; make; make test), when as custom configuration is like that:
# file t/conf/extra.conf.in PerlModule Foo::Bar #PerlLoadModule Foo::Bar # if uncommented catch an error when "make test" <Location /foo> MyFoo 30 SetHandler modperl PerlRequestHandler Foo::Bar </Location>
Obviously the variable MyFoo is corrected "handled" in Foo/Bar.pm (see mod_perl 2.0 User's guide ch.6 for more details) but seems to be not work under a "packaged" module. So I can't test... only testing "by hand" (orribly long time operation..).
I don't really understand what you mean by all this. are you saying you want to test whether MyFoo is "30" via "make test"?
that's fairly simple to do. just use the "test from within a handler" approach when planning your tests - see t/response/TestDirective/perlloadmodule.pm for an example that is custom directive specific.
if you're talking about testing something else, if you could take a moment to re-explain your issue I'm sure we can give you what you need.
Carletto is talking about the live testing of a module that won't work without running mod_perl and he is not aware of Apache-Test, required for this kind of tests.
Unfortunately apache.org is still down. But once it's up, Carletto please read: http://perl.apache.org/docs/general/testing/testing.html
__________________________________________________________________ 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
-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html