Skip Menu |

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

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

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

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: c_source is compiled even if --pureperl-only is set
Currently, even if --pureperl-only is set, c_source is compiled. An example is here: https://github.com/skaji/perl-mb-issue ``` $ perl Build.PL --pureperl-only Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'Foo' version '0.001' $ ./Build Building Foo cc -Isrc -I/Users/skaji/env/plenv/versions/01.18-v5.25.8-272/lib/perl5/5.25.9/darwin-2level/CORE -c -fno-common -DPERL_DARWIN -mmacosx-version-min=10.12 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -O3 -g -o src/add.o src/add.c ``` I think the following patch solves this issue. ``` diff --git lib/Module/Build/Base.pm lib/Module/Build/Base.pm index 26735da..baa37b0 100644 --- lib/Module/Build/Base.pm +++ lib/Module/Build/Base.pm @@ -2859,6 +2859,7 @@ sub process_support_files { my $self = shift; my $p = $self->{properties}; return unless $p->{c_source}; + return if $self->pureperl_only && $self->allow_pureperl; my $files; if (ref($p->{c_source}) eq "ARRAY") { ```
s/even if/even though/g
Fixed in 0.42_26