Skip to content

Commit 33a180d

Browse files
haargbingos
authored andcommitted
check CPAN::Meta::Requirements capabilities rather than prereqs
CPAN::Meta::Requirements will load B to try to handle vstrings when using pure-perl version.pm. This is an internal detail of CMR which may not not hold true in the future. It would be preferable for it to work without B so that CMR could be used under miniperl. Rather than checking for B, check if CPAN::Meta::Requirements can handle vstrings.
1 parent 8b924f6 commit 33a180d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/ExtUtils/MakeMaker.pm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,10 @@ sub _has_cpan_meta_requirements {
426426
return eval {
427427
require CPAN::Meta::Requirements;
428428
CPAN::Meta::Requirements->VERSION(2.130);
429-
require B; # CMR requires this, for core we have to too.
429+
# Make sure vstrings can be handled. Some versions of CMR require B to
430+
# do this, which won't be available in miniperl.
431+
CPAN::Meta::Requirements->new->add_string_requirement('Module' => v1.2);
432+
1;
430433
};
431434
}
432435

0 commit comments

Comments
 (0)