gozer 2004/03/26 14:17:08
Modified: . Changes t/conf extra.last.conf.in t/response/TestDirective perldo.pm Log: Added test to ensure <Perl> sections can have things like %Location tied. Remains a problems with dump/restore Revision Changes Path 1.354 +3 -0 modperl-2.0/Changes Index: Changes =================================================================== RCS file: /home/cvs/modperl-2.0/Changes,v retrieving revision 1.353 retrieving revision 1.354 diff -u -r1.353 -r1.354 --- Changes 26 Mar 2004 04:15:51 -0000 1.353 +++ Changes 26 Mar 2004 22:17:07 -0000 1.354 @@ -12,6 +12,9 @@ =item 1.99_14-dev +Added test to ensure <Perl> sections can have things like %Location +tied [Gozer] + Fix the installation on Win32 so that an appropriate Apache2 subdirectory under the Perl tree is used when MP_INST_APACHE2 is specified [Randy Kobes] 1.18 +17 -0 modperl-2.0/t/conf/extra.last.conf.in Index: extra.last.conf.in =================================================================== RCS file: /home/cvs/modperl-2.0/t/conf/extra.last.conf.in,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- extra.last.conf.in 26 Mar 2004 22:02:50 -0000 1.17 +++ extra.last.conf.in 26 Mar 2004 22:17:07 -0000 1.18 @@ -12,7 +12,24 @@ }; </Perl> +<Perl> +package Tie::PerlSection; +use Tie::Hash; [EMAIL PROTECTED] = (Tie::StdHash); +sub FETCH { + my ($hash, $key) = @_; + if ($key eq '/tied') { + return 'TIED'; + } + return $hash->{$key}; +} +</Perl> + <Perl > +#Test tied %Location +tie %Location, 'Tie::PerlSection'; +$Location{'/tied'} = 'test_tied'; + $Apache::Server::SaveConfig = 1; $Location{'/perl_sections_saved'} = { 'AuthName' => 'PerlSection', 1.8 +3 -1 modperl-2.0/t/response/TestDirective/perldo.pm Index: perldo.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/perldo.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- perldo.pm 29 Feb 2004 05:28:43 -0000 1.7 +++ perldo.pm 26 Mar 2004 22:17:07 -0000 1.8 @@ -11,7 +11,7 @@ sub handler { my $r = shift; - plan $r, tests => 14; + plan $r, tests => 15; ok t_cmp('yes', $TestDirective::perl::worked); @@ -27,6 +27,8 @@ ok not exists $Location{'/perl_sections'}; ok exists $Location{'/perl_sections_saved'}; ok t_cmp('PerlSection', $Location{'/perl_sections_saved'}{'AuthName'}); + + ok t_cmp('TIED', $Location{'/tied'}, 'Tied %Location'); ok t_cmp('yes', $TestDirective::perl::comments);