integrate changes#2738,2740 from maint-5.005
Gurusamy Sarathy [Thu, 11 Feb 1999 08:14:34 +0000 (08:14 +0000)]
p4raw-link: @2740 on //depot/maint-5.005/perl: fda131ef1c448f2f359fa621929e2a91dbaa6f83
p4raw-link: @2738 on //depot/maint-5.005/perl: 65d4e8d9e0f956e88a346e6535260dae7f6b8ad6

p4raw-id: //depot/perl@2862
p4raw-integrated: from //depot/maint-5.005/perl@2860 'copy in'
lib/ExtUtils/MakeMaker.pm (@2738..)

lib/ExtUtils/MakeMaker.pm

index 070156b..08a1c66 100644 (file)
@@ -441,7 +441,12 @@ sub ExtUtils::MakeMaker::new {
        }
        if ($self->{PARENT}) {
            $self->{PARENT}->{CHILDREN}->{$newclass} = $self;
-           $self->{CAPI} = $self->{PARENT}->{CAPI};
+           if (exists $self->{PARENT}->{CAPI}
+               and not exists $self->{CAPI})
+           {
+               # inherit, but only if already unspecified
+               $self->{CAPI} = $self->{PARENT}->{CAPI};
+           }
        }
     } else {
        parse_args($self,split(' ', $ENV{PERL_MM_OPT} || ''),@ARGV);
@@ -1210,6 +1215,10 @@ currently used by MakeMaker but may be handy in Makefile.PLs.
 
 Switch to force usage of the Perl C API even when compiling for PERL_OBJECT.
 
+Note that this attribute is passed through to any recursive build,
+but if and only if the submodule's Makefile.PL itself makes no mention
+of the 'CAPI' attribute.
+
 =item CCFLAGS
 
 String that will be included in the compiler call command line between