[Module-build-general] "0" options in compilation lines?
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2003-02-24 18:04:58
|
Hi Randy,
I noticed this line in the format_compiler_cmd() code from your patch:
return [ grep {defined && $_} (
$spec{cc}, '-c' ,
@{$spec{includes}} ,
@{$spec{cflags}} ,
@{$spec{optimize}} ,
@{$spec{defines}} ,
@{$spec{perlinc}} ,
"-Fo$spec{output}" ,
$spec{source} ,
) ];
I was wondering about the check for boolean truth, which will turn
argument lists like ('-foo', 0) into ('-foo'). Maybe it would be safer
to just use grep {defined()}, or grep {defined() && length()}, or
something? Or are there some zeroes you're specifically trying to
filter out?
-Ken
|