a CPAN module of mine that needs a C compiler for installation
fails in some of the tests since the C compiler isn't found. The
offending lines are
if ( system $Config{cc}, qw( -o cc_test cc_test.c ) ) {
unlink 'cc_test.c';
die "Can't run C compiler '$Config{cc}'\n";
}
where 'cc_test.c' is a simple program that gets created
automatically just for this test.
The problem is that on one of the testers machines $Config{cc}
is set to 'ccache cc' and system() obviously does not like the
space in the name of the program it's supposed to execute.
Now I probably can get around that by using a line like
if ( system split /\s+/, $Config{cc}, qw( -o cc_test cc_test.c ) ) {
or something similar but it looks ugly and I suspect that there
is a better method to invoke the correct C compiler. Does anybody
have an idea?
Thanks and regards, Jens
--
\ Jens Thoms Toerring ___ j...@toerring.de
\__________________________ http://toerring.de
system fails because you are passing part as a string and
part as a list. Just pass a single string and let system
do the parsing.
if (system "$Config{cc} -o cc_test cc_test.c")
--S
> system fails because you are passing part as a string and
> part as a list. Just pass a single string and let system
> do the parsing.
> if (system "$Config{cc} -o cc_test cc_test.c")
Thank you, I will try it that way. Looks like it's the simplest
method to get it to work.
Best regards, Jens