Subject: | dev releases are not removing _ from their versions |
It is important, when using underscores in $VERSIONs, to strip the underscore
from the variable in a subsequent line.
for example:
$VERSION = '1.002_003';
$VERSION = eval $VERSION;
or:
$VERSION = '1.002_003';
$VERSION =~ s/_//g;
or (this is the form I prefer, as it is compact and avoids eval):
$VERSION = '1.002_003';
$VERSION =~ tr/_//d;
The important thing is that:
1. the original $VERSION declaration line contains the underscore, as this is
the line that ExtUtils::MakeMaker::parse_version and
Module::Metadata->_evaluate_version_line use to populate metdata.
2. the actual $VERSION variable used in runtime *does not* contain the
underscore, as naive version comparisons that do not use version.pm expect a
numeric value. You can see how this assumption fails in your very own unit
tests (where the culprit in this case is Data::Dumper):
Argument "2.167_02" isn't numeric in numeric gt (>) at t/20-unit/Error-TypeTiny-Assertion/basic.t line 167.
Ordinarily I would supply a pull request making this fix, but it appears
you use a custom package builder which adds the version declarations, so
modifications will have to be made to that code instead to add the correct
constructs.