Skip Menu |

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 14534
Status: resolved
Priority: 0/
Queue: Module-Build

Owner: Nobody in particular
Requestors: andrew.benham [...]

Bug Information
Severity: Wishlist
Broken in: 0.27_02
Fixed in: (no value)

Subject: makefile_to_build_args() barfs on empty args
Download (untitled) / with headers
text/plain 1.2k
Our automated build system configures Perl modules with code like: $PERL Makefile.PL "${CCFLAGS:+CCFLAGS=}${CCFLAGS}" \ "${OPTIMIZE:+OPTIMIZE=}${OPTIMIZE}" \ "${DEFINE:+DEFINE=}${DEFINE}" \ "${INC:+INC=}${INC}" \ "${LIBS:+LIBS=}${LIBS}" ${MAKEMAKER_ARGS} </dev/null which DTRT for modules with 'traditional' Makefile.PL files. However on modules where Makefile.PL calls Module::Build::Compat we see things like: % /usr/bin/perl Makefile.PL 'CCFLAGS=-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm' 'OPTIMIZE=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables' '' '' '' Malformed argument '' at /usr/lib/perl5/site_perl/5.8.6/Module/Build/ line 135. In this case, that's because $DEFINE, $INC, and $LIBS are all empty for this architecture/module/build. It would be neat to add a line to Module::Build::Compat to get it to ignore empty args, like so: sub makefile_to_build_args { shift; my @out; foreach my $arg (@_) { + next if ($arg eq ''); my ($key, $val) = ($arg =~ /^(\w+)=(.+)/ ? ($1, $2) : die "Malformed argument '$arg'");
I agree. I'll add the patch. Thanks. -Ken

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to