Subject: | Unexpected result from dist_version_from with underscore |
Date: | Tue, 10 May 2016 11:18:24 +0200 |
To: | bug-Module-Build [...] rt.cpan.org |
From: | Mark Lawrence <nomad [...] null.net> |
Software versions (all on Debian):
This is perl 5, version 22, subversion 1 (v5.22.1) built for
i586-linux-gnu-thread-multi-64int (with 58 registered patches, see
perl -V for more detail)
L/LE/LEONT/Module-Build-0.4218.tar.gz
/home/mark/.direnv/perl5/lib/perl5/Module/Build.pm
Installed: 0.4218
CPAN: 0.4218 up to date
Ken Williams (KWILLIAMS)
kwilliams@cpan.org
mark@mlt:~/tmp.ZzaK6XwnsX$ cat lib/Simple.pm
package Simple;
use strict;
use warnings;
our $VERSION = '0.0.1_1';
1;
__END__
mark@mlt:~/tmp.ZzaK6XwnsX$ cat Build.PL
#!perl
use strict;
use warnings;
use Module::Build;
my $builder = Module::Build->new(
dist_abstract => 'a simple module',
module_name => 'Simple',
license => 'GPL_3',
dist_author => 'Mark Lawrence <nomad@null.net>',
dist_version_from => 'lib/Simple.pm',
);
$builder->create_build_script();
mark@mlt:~/tmp.ZzaK6XwnsX$ perl Build.PL
Can't find dist packages without a MANIFEST file Run 'Build manifest'
to generate one
WARNING: Possible missing or corrupt 'MANIFEST' file.
Nothing to enter for 'provides' field in metafile.
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Simple' version 'v0.0.11'
The issue I have is that verion '0.0.1_1' in Simple.pm is detected as
'v0.0.11'. If I use (dist_version => '0.0.1_1') directly then the
behaviour is as I would expect.
Apparently a decision was made at the Lyon consensus about how
version.pm should handle underscores. I do not fully understand what
the full ramifications of that decision are. Are versions with
underscores still valid:
- As a $Module::VERSION?
- As a distribution version?
If yes, then I would expect Module::Build to extract and report the
$Module::VERSION as it appears.
Mark
--
Mark Lawrence