theory/semver

Why is this module needed?

bessarabov opened this issue · 4 comments

I'm very sorry for asking such rude question but I don't understand the purpose of this module.

I understand what semantic version is and I want to use this verions scheme in my Perl modules, but I don't understand why I nee to use your special module to work with semantic versions in Perl modules.

I've done several experiments and I haven't found any problems if I just write our$VERSION = '0.0.1';` in pm file.

I've also tried to use Dist::Zilla, and it also words with semantic versions. I've written version = 0.0.1 in dist.ini and everything worked fine.

Can you please explain why work with semantic verions should be done with your module?

Thank you for the quick answer!

What do you think of creating test (that will should be placed somewhere in xt/author, for example) that will check if the version is valid semantic version?

Meh. I have no opinion. Should be simple enough, though.

use Test::More;
use SemVer;

for my $version_string (find VERSIONs) {
    lives_ok { SemVer->parse($version } or diag $@;
}

Or you can just use vstrings, though watch out for this bug.

Perfect! Thank you. This is exactly what I needed.