This removes the most hairiest part of the prerequisites filtering.
next unless $obj; # Not in the module tree (e.g. Config)
next if $obj->package_is_perl_core;
- my $version;
- if ($prereqs->{$prereq}) {
- if ($obj->installed_version && $obj->installed_version < $obj->version) {
- $version = $obj->installed_version;
- } else {
- $version = $obj->package_version;
- }
- }
+ my $version = $prereqs->{$prereq} || undef;
push @requires, [ $obj->package_name, $version ];
}