Re: What's the best way to make "perl Makefile.PL" set the CC variable to a different path?

[email protected] ("Sisyphus") Thu, 9 Aug 2012 19:19:30 +1000
Newsgroups perl.makemaker
Message-ID <2F4CA88FE9404309B8A9B814E4AEEF67@desktop2>
----- Original Message ----- 
From: "Shlomi Fish"

> what is the best way to make perl Makefile.PL set the value of the CC 
> variable in the "Makefile" file
> to a different value?

I've a notion that you can override the default CC with (untested):

perl Makefile.PL CC=whatever

but if that turns out to be not the case, or doesn't really suit, then 
there's always the option of using tied():

##############################
C:\>type Makefile.PL

use ExtUtils::MakeMaker;

$obj = tied(%Config::Config);
$obj->{cc} = 'whatever';

print $Config::Config{cc}, "\n";

C:\>perl Makefile.PL
whatever

C:\>
##############################

Sorry if neither of those options are of any use :-)

Cheers,
Rob