If you have the latest version module A, `cpanm A~9999` does not count as failure. #246

Closed
wants to merge 1 commit into from

2 participants

@skaji

Here is what I have done:

% perl -MTest::More -E 'say Test::More->VERSION'
0.98
% cpanm Test::More~9999 && echo OK
Test::More is up to date. (0.98)
OK

I expected that the second command cpanm Test::More~9999 && echo OK would fail with output like Found Test::More 0.98 which doesn't satisfy 9999.

@miyagawa
Owner

which version of cpanm?

➜  cpanminus git:(devel) ✗ cpanm Test::More~9999 && echo OK
Found Test::More 0.98 which doesn't satisfy 9999.
@skaji

I'm using cpanm 1.6909.

% cpanm -V
cpanm (App::cpanminus) version 1.6909 (/Users/skaji/.plenv/versions/5.16.3/bin/cpanm)
perl version 5.016003 (/Users/skaji/.plenv/versions/5.16.3/bin/perl5.16.3)

  %Config:
    archname=darwin-2level
    installsitelib=/Users/skaji/.plenv/versions/5.16.3/lib/perl5/site_perl/5.16.3
    installsitebin=/Users/skaji/.plenv/versions/5.16.3/bin
    installman1dir=/Users/skaji/.plenv/versions/5.16.3/man/man1
    installman3dir=/Users/skaji/.plenv/versions/5.16.3/man/man3
    sitelibexp=/Users/skaji/.plenv/versions/5.16.3/lib/perl5/site_perl/5.16.3
    archlibexp=/Users/skaji/.plenv/versions/5.16.3/lib/perl5/5.16.3/darwin-2level
    privlibexp=/Users/skaji/.plenv/versions/5.16.3/lib/perl5/5.16.3
  %ENV:
  @INC:
    /Users/skaji/.plenv/versions/5.16.3/lib/perl5/site_perl/5.16.3/darwin-2level
    /Users/skaji/.plenv/versions/5.16.3/lib/perl5/site_perl/5.16.3
    /Users/skaji/.plenv/versions/5.16.3/lib/perl5/5.16.3/darwin-2level
    /Users/skaji/.plenv/versions/5.16.3/lib/perl5/5.16.3
    .

I tried curl -k https://raw.github.com/miyagawa/cpanminus/devel/cpanm | perl - Test::More~9999, but the output was still Test::More is up to date. (0.98).

@miyagawa
Owner

This is due to the change in d167f40 for #229.

@skaji

I see.

% cpanm --no-skip-installed Test::More~9999 && echo OK
Found Test::More 0.98 which doesn't satisfy 9999.
@miyagawa miyagawa added a commit that closed this pull request May 3, 2013
@miyagawa Fix the check order for requirements, in case returned search doesn't…
… satisfy the minimum version. Fix #246
05c6b6c
@miyagawa miyagawa closed this in 05c6b6c May 3, 2013
@miyagawa
Owner

Fixed.

@skaji

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment