1 2use Apache::ASP::CGI; 3use lib qw(t .); 4use T; 5use strict; 6 7$SIG{__DIE__} = \&Carp::confess; 8 9chdir('t'); 10my $r = Apache::ASP::CGI->init('reload_global_asa.t'); 11my %config = ( 12 UseStrict => 1, 13# Debug => -3, 14 ); 15for(keys %config) { 16 $r->dir_config->set($_, $config{$_}); 17} 18 19my $t = T->new; 20 21# will trigger error when reloading subs 22# critical to the test case 23local $^W = 1; 24 25my $ASP_1 = Apache::ASP->new($r); 26$t->eok(keys(%Apache::ASP::Compiled) >= 1, "nothing compiled"); 27%Apache::ASP::Compiled = (); # free compiled routines 28my $ASP_2 = Apache::ASP->new($r); 29 30# so to untie STDOUT 31$ASP_1->DESTROY; 32$ASP_2->DESTROY; 33 34$t->ok; 35$t->done; 36 37