Skip Menu |

This queue is for tickets about the Params-Util CPAN distribution.

Report information
The Basics
Id: 67522
Status: resolved
Priority: 0/
Queue: Params-Util

People
Owner: Nobody in particular
Requestors: mkanat [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.03
Fixed in: (no value)



Subject: have_compiler returns false, can_xs returns true
The can_xs subroutine in Makefile.PL doesn't actually work right when there is no compiler installed. The "return" underneath the have_compiler check just exits from the eval block, it doesn't actually return from the subroutine. I'll attach a patch that fixes this. This is pretty important since it's currently breaking every new Bugzilla install.
Here is the patch. I've tested this on a machine without gcc and it works. (It even works on a machine where ExtUtils::MM is too old.)
Subject: pu-mm.diff
Only in Params-Util-1.03-new/: Makefile diff -ru Params-Util-1.03/Makefile.PL Params-Util-1.03-new/Makefile.PL --- Params-Util-1.03/Makefile.PL 2010-11-21 17:58:31.000000000 -0800 +++ Params-Util-1.03-new/Makefile.PL 2011-04-16 16:03:52.342648049 -0700 @@ -136,12 +136,12 @@ # Do a simple compile that consumes the headers we need my $object = undef; my @libs = (); + my $builder = ExtUtils::CBuilder->new( quiet => 1 ); + unless ( $builder->have_compiler ) { + # Simple lack of a compiler at all + return 0; + } eval { - my $builder = ExtUtils::CBuilder->new( quiet => 1 ); - unless ( $builder->have_compiler ) { - # Simple lack of a compiler at all - return 0; - } $object = $builder->compile( source => 'sanexs.c', ); Only in Params-Util-1.03-new/: Util.c
Applied patch in 1.04, please reopen if your problem continues.