Subject: | "original" field is saving numeric form, not string |
$; perl -v | head -n2
This is perl 5, version 20, subversion 0 (v5.20.0) built for darwin-2level
: [ether@bourbon git/Dist-Zilla-Plugin-OnlyCorePrereqs]$; perl -MData::Dumper -Mversion -wle'print Dumper($]); my $foo = $]; print Dumper($foo); print Dumper(version->parse($foo)); print Dumper(version->parse("$foo"))'
$VAR1 = '5.020000';
$VAR1 = '5.020000';
$VAR1 = bless( {
'version' => [
5,
20
],
'original' => '5.02'
}, 'version' );
$VAR1 = bless( {
'original' => '5.020000',
'version' => [
5,
20,
0
]
}, 'version' );
The above code demonstrates that the numeric form of the supplied argument is
being saved as "original", not the string form. For variables such as $]
which are dualvar, this is an important distinction, and I believe it is more
correct to save the stringified form, to avoid unintended loss of zero digits.