ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ExtUtils-CXX/CXX.pm
(Generate patch)

Comparing ExtUtils-CXX/CXX.pm (file contents):
Revision 1.1 by root, Mon Aug 14 04:30:22 2017 UTC vs.
Revision 1.2 by root, Mon Aug 14 05:26:35 2017 UTC

64 64
65package ExtUtils::CXX; 65package ExtUtils::CXX;
66 66
67use common::sense; 67use common::sense;
68 68
69our $VERSION = 0.02; 69our $VERSION = 0.03;
70 70
71use parent Exporter::; 71use Exporter 'import';
72 72
73our @EXPORT = qw(extutils_cxx); 73our @EXPORT = qw(extutils_cxx);
74
75use ExtUtils::MakeMaker::Config ();
74 76
75=item extutils_cxx BLOCK; 77=item extutils_cxx BLOCK;
76 78
77This function temporarily does hideous things so you can call 79This function temporarily does hideous things so you can call
78C<WriteMakefile> or similar functions in the BLOCK normally. See the 80C<WriteMakefile> or similar functions in the BLOCK normally. See the
124 126
125 my $tie = tied %Config; 127 my $tie = tied %Config;
126 128
127 # now dive into internals of Config and temporarily patch those values 129 # now dive into internals of Config and temporarily patch those values
128 130
129 $tie->{ld} = "/uasr/bin/gcc-4.6 -O";
130 local $tie->{cc} = $Config{cc}; _ccrepl cc => "CXX"; 131 local $tie->{cc} = $Config{cc}; _ccrepl cc => "CXX";
131 local $tie->{ld} = $Config{ld}; _ccrepl ld => ($ENV{PERL_CXXLD} ? "CXXLD" : "CXX"); 132 local $tie->{ld} = $Config{ld}; _ccrepl ld => ($ENV{PERL_CXXLD} ? "CXXLD" : "CXX");
133
134 local $ExtUtils::MakeMaker::Config::Config{cc} = $tie->{cc};
135 local $ExtUtils::MakeMaker::Config::Config{ld} = $tie->{ld};
132 136
133 eval { 137 eval {
134 $cb->(); 138 $cb->();
135 }; 139 };
136 die if $@; 140 die if $@;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines