stas 2003/03/23 20:47:48
Modified: lib/Apache Build.pm
Log:
refurbish unused sub typemaps to find the installed Apache typemap
Revision Changes Path
1.116 +11 -7 modperl-2.0/lib/Apache/Build.pm
Index: Build.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -r1.115 -r1.116
--- Build.pm 24 Mar 2003 03:11:04 -0000 1.115
+++ Build.pm 24 Mar 2003 04:47:48 -0000 1.116
@@ -1195,17 +1195,21 @@
}
sub typemaps {
- my $typemaps = [];
+ my $self = shift;
+ my @typemaps = ();
- if (my $file = find_in_inc('typemap')) {
- push @$typemaps, $file;
- }
+ # XXX: could move here the code from ModPerl::BuildMM
+ return [] if IS_MOD_PERL_BUILD;
- if(IS_MOD_PERL_BUILD) {
- push @$typemaps, '../Apache/typemap';
+ # for post install use
+ for (@INC) {
+ # make sure not to pick mod_perl 1.0 typemap
+ next if $self->{MP_INST_APACHE2} && $_ !~ /Apache2$/;
+ my $file = "$_/auto/Apache/typemap";
+ push @typemaps, $file if -e $file;
}
- return $typemaps;
+ return [EMAIL PROTECTED];
}
sub includes {