Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Code cleanup in _translate_cpan_deps().

  • Loading branch information...
commit d00a9e5d5102b6e7b3123c0514428997afe759f8 1 parent 1e477cf
@juster authored
Showing with 6 additions and 11 deletions.
  1. +6 −11 lib/CPANPLUS/Dist/Arch.pm
View
17 lib/CPANPLUS/Dist/Arch.pm
@@ -957,17 +957,12 @@ sub _translate_cpan_deps
# 0+$] is needed to force the perl version into number-dom
# otherwise trailing zeros cause problems
- my $bundled_version = $Module::CoreList::version{ 0+$] }->{$modname};
- if ( defined $bundled_version ) {
- # Avoid parsing an empty string (causes an error) or 0.
- next CPAN_DEP_LOOP unless $depver;
-
- # Avoid parsing a bundled version of 0. Is this possible?
- if ( $bundled_version ) {
- my $bundle_vobj = version->parse( $bundled_version );
- my $dep_vobj = version->parse( $depver );
- next CPAN_DEP_LOOP if $bundle_vobj >= $dep_vobj;
- }
+ my $corever = $Module::CoreList::version{ 0+$] }->{$modname};
+ if ( $corever ) {
+ next CPAN_DEP_LOOP unless $depver; # avoids empty string
+ my $corev = version->parse( $corever );
+ my $depv = version->parse( $depver );
+ next CPAN_DEP_LOOP if $corev >= $depv;
}
# Translate the module's distribution name into a package name...
Please sign in to comment.
Something went wrong with that request. Please try again.