File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -1931,9 +1931,22 @@ sub create_mymeta {
1931
1931
$mymeta_obj = $meta_obj ;
1932
1932
} else {
1933
1933
# if we have metadata, just update it
1934
+ my $prereqs = $self -> _normalize_prereqs;
1935
+ if (my $merge = $self -> meta_merge) {
1936
+ unless ($merge -> {' meta-spec' } && ($merge -> {' meta-spec' }{version } // ' 1.4' ) eq ' 2' ) {
1937
+ require CPAN::Meta::Converter;
1938
+ $merge = CPAN::Meta::Converter-> new($merge )-> upgrade_fragment;
1939
+ }
1940
+ if ($merge -> {prereqs }) {
1941
+ my $left = CPAN::Meta::Prereqs-> new($prereqs );
1942
+ my $right = CPAN::Meta::Prereqs-> new($merge -> {prereqs });
1943
+ $prereqs = $left -> with_merged_prereqs($right )-> as_string_hash;
1944
+ }
1945
+ }
1946
+
1934
1947
my %updated = (
1935
1948
%{ $meta_obj -> as_struct({ version => 2.0 }) },
1936
- prereqs => $self -> _normalize_prereqs ,
1949
+ prereqs => $prereqs ,
1937
1950
dynamic_config => 0,
1938
1951
generated_by => " Module::Build version $Module::Build::VERSION " ,
1939
1952
);
You can’t perform that action at this time.
0 commit comments