home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / perl / TestRunPerl.pm < prev    next >
Encoding:
Perl POD Document  |  2003-05-13  |  1.2 KB  |  53 lines

  1. package Apache::TestRunPerl;
  2.  
  3. use strict;
  4. use warnings FATAL => 'all';
  5.  
  6. use Apache::TestRun ();
  7. use Apache::TestConfigParse ();
  8.  
  9. use File::Spec::Functions qw(catfile);
  10.  
  11. #subclass of Apache::TestRun that configures mod_perlish things
  12. use vars qw(@ISA);
  13. @ISA = qw(Apache::TestRun);
  14.  
  15. sub pre_configure {
  16.     my $self = shift;
  17.  
  18.     # Apache::TestConfigPerl already configures mod_perl.so
  19.     Apache::TestConfig::autoconfig_skip_module_add('mod_perl.c');
  20. }
  21.  
  22. sub configure_modperl {
  23.     my $self = shift;
  24.  
  25.     my $test_config = $self->{test_config};
  26.  
  27.     $test_config->preamble_register(qw(configure_libmodperl));
  28.  
  29.     $test_config->postamble_register(qw(configure_inc
  30.                                         configure_trace
  31.                                         configure_pm_tests_inc
  32.                                         configure_startup_pl
  33.                                         configure_pm_tests));
  34. }
  35.  
  36. sub configure {
  37.     my $self = shift;
  38.  
  39.     $self->configure_modperl;
  40.  
  41.     $self->SUPER::configure;
  42. }
  43.  
  44. #if Apache::TestRun refreshes config in the middle of configure
  45. #we need to re-add modperl configure hooks
  46. sub refresh {
  47.     my $self = shift;
  48.     $self->SUPER::refresh;
  49.     $self->configure_modperl;
  50. }
  51.  
  52. 1;
  53.