in reply to Re: cpan smokers, PREREQ_PM, and PDL dependency
in thread cpan smokers, PREREQ_PM, and PDL dependency

UPDATE: I think I have a patch which works...

Thanks for showing me perl-reversion! It's nice, but I can't convince it to replace the version in one of my t/*.t test files. I'm using the format straight out of Test::More:
BEGIN { use_ok('Some::Module', 1.02) }

I don't see any relevant RT issues open for it. I'll keep staring at the code to figure out why, but if you happen to know of a workaround, please let me know.

  • Comment on Re^2: cpan smokers, PREREQ_PM, and PDL dependency (perl-reversion)
  • Download Code

Replies are listed 'Best First'.
Re^3: cpan smokers, PREREQ_PM, and PDL dependency (perl-reversion)
by Corion (Patriarch) on Nov 19, 2015 at 17:53 UTC

    I don't think it looks for arbitrary numbers. Reading through the source, it seems to look for things like VERSION followed by something that looks like a version number.

    I guess a good workaround could be to use:

    BEGIN { my $VERSION; $VERSION = 1.02; use_ok('Some::Module', 1.02); };

    ... but then, I'm not sure what the use of use_ok is anyway. The test will crash if use_ok fails, but if it fails, there is little sense to continue anyway :)

      Thanks for the reply. I looked at other open patches, and I think I created one for myself:
      sub version_re_test { my $ver_re = shift; return qr{ ^ ( .*? use_ok .*? ) $ver_re ( .* \s*) \z }x; }
      I'll test it out, and if it works, I might upload it to RT. Yeah, I'm wondering if use_ok adds any value myself. I thought this was the standard way to test the VERSION variable. Is there another standard way?
Re^3: cpan smokers, PREREQ_PM, and PDL dependency (perl-reversion)
by choroba (Cardinal) on Nov 19, 2015 at 17:50 UTC
    Just tell reversion where to search:
    perl-reversion .

    If it finds too much, be more specific about the version you want to change:

    perl-reversion --current 1.02 --bump

    Or search only some directories

    perl-reversion t lib

    etc.

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,