in reply to Re: problem incrementing module version number
in thread problem incrementing module version number

Looked up MMA.* in /usr/local and deleted whatever directories started with IPC (module is IPC::MMA ie IPC/MMA). Made no difference. My ll command shows .files which I think are what Unix would call a hidden file. Not sure what a system file would be... is that a unix or windows concept?
<br Looked up posts for the specific error message and no answerer ever said "this message happens when (entity) compares the (something) to the bootstrap or version in the .pm file". Nothing like that anywhere on the Net!

Did I mention this is an xs module? in 'perlxs' I find the following:
The VERSIONCHECK: Keyword The VERSIONCHECK: keyword corresponds to xsubpp's -versioncheck and -n +oversioncheck options. This keyword overrides the command line option +s. Version checking is enabled by default. When version checking is e +nabled the XS module will attempt to verify that its version matches +the version of the PM module. To enable version checking: VERSIONCHECK: ENABLE To disable version checking: VERSIONCHECK: DISABLE
I guess my Q devolves into "where does the XS module get/determine 'its' version to match against the .pm version which is the thing that has gone up to 0.5.1?"

cmac

Replies are listed 'Best First'.
Re^3: problem incrementing module version number
by cmac (Monk) on Feb 15, 2009 at 03:37 UTC
    Updated 9PM PST: Putting VERSIONCHECK: DISABLE in my xs file, after the MODULE statement, allowed 'make test' to run.

    But there was more to the story. When I then got to 'make tardist', it made an awful-looking filename for the tar.gz, ending (the file is not around any more) something like \005\001.tar.gz instead of 0.5.1.tar.gz. From this I inferred that something in the chain ExtUtils::MakeMaker -> tar -> gzip did not like my new $VERSION = "0.5.1" in my .pm file. So I changed it to "0.51", also in the name of the build directory.

    With this change the VERSIONCHECK: DISABLE is no longer needed in my .xs file.

    A monastery should have some scribes to record stuff like this for the coming ages...

    Thanks for the help,
    cmac

      Be careful on your next rev: in all likelyhood, you just went from a version of 0.005000 to 0.051000 (see version). If you go to 0.6 next time around, I am guessing that your version string will end up being 0.006000, which is a backward jump from 0.051000. I am guessing that you will need to go to 0.52 or higher.

      --MidLifeXis

      I believe that in your pm file, you probably had:
      our $VERSION = 0.5.1;
      which, when treated as a number, evaluates to 0. So ... you're using version 0.5.1 of the pm file, but the version of the object file is being evaluated as 0. Hence the "mismatch" error you've quoted. I've just tested this on one of my modules:
      t/funcs....Math::M object version 0 does not match bootstrap parameter + v0.5.1 at C:/perl510_M/5.10.0/lib/DynaLoader.pm line 225.
      If you do:
      our $VERSION = 0.51;
      (or 0.6, as I suggested trying), then you're using an actual number, and the mismatch won't arise. I've never used more than one '.' in any of my version numbers, so I'm not sure of the correct advice to give with respect to doing that. Maybe you want to use version; for that. I think it would also work out ok if you put the version number in quotes:
      our $VERSION = '0.5.1';
      But again, this is an area I haven't experimented much with.

      Cheers,
      Rob