Subject: | 'have_c_compiler()' aborts due to missing '_build' dir |
The following Build.PL fails:
use Module::Build;
if (! Module::Build->new(module_name => 'My::Module', license => 'perl')
->have_c_compiler())
{
die("No 'C' compiler found to build My::Module\n");
}
Error message is:
Can't create : No such file or directory at /usr/local/lib/perl5/site_perl/5.8/Module/Build/Base.pm line 2493.
This is caused because Module::Build is not creating the '_build' dir prior to executing 'have_c_compiler()'.
A workaround of adding "mkdir('_build', 0777);" before the 'if' statement allows the Build.PL to function properly.