Author: pgollucci Date: Tue Dec 5 04:34:57 2006 New Revision: 482625 URL: http://svn.apache.org/viewvc?view=rev&rev=482625 Log: Prevent direct use of _deprecated_ Apache2::ReadConfig in <Perl> sections with httpd Alias directives from incorrectly generating 'The Alias directive in xxxxx at line y will probably never match' messages.
This silences the related 5 test suite warnings: [warn] The Alias directive in mod_perl at line 1 will probably never match because it overlaps an earlier Alias. Reported by: Stas Bekman <[EMAIL PROTECTED]> Modified: perl/modperl/trunk/Changes perl/modperl/trunk/lib/Apache2/PerlSections.pm Modified: perl/modperl/trunk/Changes URL: http://svn.apache.org/viewvc/perl/modperl/trunk/Changes?view=diff&rev=482625&r1=482624&r2=482625 ============================================================================== --- perl/modperl/trunk/Changes (original) +++ perl/modperl/trunk/Changes Tue Dec 5 04:34:57 2006 @@ -12,6 +12,13 @@ =item 2.0.4-dev +Prevent direct use of _deprecated_ Apache2::ReadConfig in +<Perl> sections with httpd Alias directives from +incorrectly generating +'The Alias directive in xxxxx at line y will probably never match' +messages. +[Philip M. Gollucci <[EMAIL PROTECTED]>] + Prevent Apache2::PerSections::symdump() from returning invalid httpd.conf snippets like 'Alias undef' [Philip M. Gollucci <[EMAIL PROTECTED]>] Modified: perl/modperl/trunk/lib/Apache2/PerlSections.pm URL: http://svn.apache.org/viewvc/perl/modperl/trunk/lib/Apache2/PerlSections.pm?view=diff&rev=482625&r1=482624&r2=482625 ============================================================================== --- perl/modperl/trunk/lib/Apache2/PerlSections.pm (original) +++ perl/modperl/trunk/lib/Apache2/PerlSections.pm Tue Dec 5 04:34:57 2006 @@ -79,6 +79,8 @@ Apache2::Const::OK; } +my %directives_seen_hack; + sub symdump { my ($self) = @_; @@ -99,7 +101,10 @@ push @{$self->{symbols}}, [$key, $ENTRY]; } if (defined $val && defined *ENTRY{ARRAY}) { - push @{$self->{symbols}}, [$key, [EMAIL PROTECTED]; + unless (exists $directives_seen_hack{"$key$val"}) { + $directives_seen_hack{"$key$val"} = 1; + push @{$self->{symbols}}, [$key, [EMAIL PROTECTED]; + } } if (defined $val && defined *ENTRY{HASH} && $key !~ /::/) { push @{$self->{symbols}}, [$key, \%ENTRY];