Author: phred Date: Sun Oct 17 18:41:46 2010 New Revision: 1023551 URL: http://svn.apache.org/viewvc?rev=1023551&view=rev Log: Add Apache-Test 1.34 dependency, and install in the same directory as mod_perl to prevent conflicts with cpan module installs.
Modified: perl/Apache-Reload/trunk/Changes perl/Apache-Reload/trunk/Makefile.PL perl/Apache-Reload/trunk/lib/Apache2/Reload.pm Modified: perl/Apache-Reload/trunk/Changes URL: http://svn.apache.org/viewvc/perl/Apache-Reload/trunk/Changes?rev=1023551&r1=1023550&r2=1023551&view=diff ============================================================================== --- perl/Apache-Reload/trunk/Changes (original) +++ perl/Apache-Reload/trunk/Changes Sun Oct 17 18:41:46 2010 @@ -11,6 +11,9 @@ Changes - Apache::Reload change logfile =item 0.11 August 21, 2010 +Add Apache-Test 1.34 dependency. +[Phred] + Ignore require-hooks which exist in %INC [Ryan Gies <r...@livesite.net>] Modified: perl/Apache-Reload/trunk/Makefile.PL URL: http://svn.apache.org/viewvc/perl/Apache-Reload/trunk/Makefile.PL?rev=1023551&r1=1023550&r2=1023551&view=diff ============================================================================== --- perl/Apache-Reload/trunk/Makefile.PL (original) +++ perl/Apache-Reload/trunk/Makefile.PL Sun Oct 17 18:41:46 2010 @@ -5,7 +5,7 @@ use Config; my %prereqs = (); my %mp2 = ( mod_perl2 => 1.99022 ); my %mp1 = ( mod_perl => 0 ); -my $at_min_ver = 1.30; +my $at_min_ver = 1.34; my $mp_gen; if ($ENV{MOD_PERL_2_BUILD}) { @@ -45,6 +45,7 @@ else { ); } +# MOD_PERL_2_BUILD is set from building from mod_perl Makefile.PL if ($ENV{MOD_PERL_2_BUILD}) { pop @ARGV; } @@ -53,10 +54,9 @@ sub check_for_apache_test { return unless eval { require Apache::Test; if ($Apache::Test::VERSION < $at_min_ver) { - warn "Apache::Test version is " . $Apache::Test::VERSION . + die "Apache::Test version is " . $Apache::Test::VERSION . ", minimum version required is $at_min_ver" . ", tests will be skipped\n"; - die; } require Apache::TestMM; require Apache::TestRunPerl; @@ -67,13 +67,6 @@ sub check_for_apache_test { my %args = @Apache::TestMM::Argv; - return 0 - unless (( Apache::TestConfig->can('custom_config_path') - and -f Apache::TestConfig->custom_config_path()) - or $args{apxs} or $args{httpd} - or $ENV{APACHE_TEST_HTTPD} or $ENV{APACHE_TEST_APXS}); - - Apache::TestRunPerl->generate_script(); return 1; @@ -180,6 +173,15 @@ EOF eval { require mod_perl }; if ($@) { # if we don't have mp1, check for mp2 + # see if we are in the mp2 build structure + eval { require File::Spec }; + unless ($@) { + my $mplib = File::Spec->catdir('..', 'lib'); + unshift @INC, $mplib if -e File::Spec->catfile($mplib,'mod_perl2.pm'); + my $atlib = File::Spec->catdir('../', 'Apache-Test', 'lib'); + unshift @INC, $atlib if -d $atlib; + } + eval { require mod_perl2 } if ($@); unless ($@) { $wanted = 2; @@ -236,3 +238,24 @@ sub clean { return $self->SUPER::clean(@_); } + +sub constants { + my $self = shift; + + my $string = $self->MM::constants; + + # mp2 installs this into INSTALLSITEARCH, so in order to avoid + # problems when users forget 'make install UNINST=1', trick MM into + # installing pure perl modules to the sitearch location, when this is + # not installed as a part of mp2 build + if (!$ENV{MOD_PERL_2_BUILD}) { + $string .= <<'EOI'; + +# install into the same location as mod_perl 2.0 +INSTALLSITELIB = $(INSTALLSITEARCH) +DESTINSTALLSITELIB = $(DESTINSTALLSITEARCH) +EOI + } + + $string; +} Modified: perl/Apache-Reload/trunk/lib/Apache2/Reload.pm URL: http://svn.apache.org/viewvc/perl/Apache-Reload/trunk/lib/Apache2/Reload.pm?rev=1023551&r1=1023550&r2=1023551&view=diff ============================================================================== --- perl/Apache-Reload/trunk/lib/Apache2/Reload.pm (original) +++ perl/Apache-Reload/trunk/lib/Apache2/Reload.pm Sun Oct 17 18:41:46 2010 @@ -18,8 +18,6 @@ package Apache2::Reload; use strict; use warnings FATAL => 'all'; -use mod_perl2; - our $VERSION = '0.12'; use Apache2::Const -compile => qw(OK);