Currently Module::Build::XSUtil does not work well with distributions
that offer an "XS" version or a "Pure Perl" version.
In fact, even if we create a Module::Build::XSUtil instance with allow_pureperl true and users execute Build.PL with --pureperl-only,
Module::Build::XSUtil checks whether users have c compilers or not.
It would be nice if Module::Build::XSUtil support such distributions.
An easy fix may be
diff --git lib/Module/Build/XSUtil.pm lib/Module/Build/XSUtil.pm
index 51e9952..235e253 100644
--- lib/Module/Build/XSUtil.pm
+++ lib/Module/Build/XSUtil.pm
@@ -19,6 +19,7 @@ sub new {
my %args = @_;
my $self = $class->SUPER::new(%args);
+ return $self if $self->pureperl_only && $self->allow_pureperl;
if ( !defined $args{cc_warnings} ) {
$args{cc_warnings} = 1;
Currently Module::Build::XSUtil does not work well with distributions that offer an "XS" version or a "Pure Perl" version.
In fact, even if we create a Module::Build::XSUtil instance with allow_pureperl true and users execute Build.PL with --pureperl-only, Module::Build::XSUtil checks whether users have c compilers or not.
It would be nice if Module::Build::XSUtil support such distributions.
An easy fix may be