(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
+my %extra_prereqs = (
+ indirect => 0,
+ multidimensional => 0,
+ 'bareword::filehandles' => 0,
+);
+my $have_compiler
+ = eval { require ExtUtils::CBuilder; 1 }
+ && ExtUtils::CBuilder->new->have_compiler;
+
WriteMakefile(
NAME => 'strictures',
VERSION_FROM => 'lib/strictures.pm',
},
prereqs => {
- runtime => {
- recommends => {
- indirect => 0,
- multidimensional => 0,
- 'bareword::filehandles' => 0,
- },
- },
configure => {
requires => {
'ExtUtils::CBuilder' => 0,
},
},
+ runtime => {
+ ( $] >= 5.008004 && !$have_compiler
+ ? ( recommends => \%extra_prereqs ) : () ),
+ },
},
},
- (eval { require ExtUtils::CBuilder; 1 }
- and ExtUtils::CBuilder->new->have_compiler)
- ? (PREREQ_PM => {
- indirect => 0,
- multidimensional => 0,
- 'bareword::filehandles' => 0,
- })
- : (),
+ ($] >= 5.008004 && $have_compiler
+ ? ( PREREQ_PM => \%extra_prereqs ) : () ),
);