On Wed Oct 28 14:08:08 2009, john.peacock@adatshalom.net wrote:
Show quoted text> Do you mean 5.10.1? ActiveState is a) changing modules that they do not
> "own", and b) doing so without apparently testing anything.
Yes. 5.10.1. However, the issue isn't fixing AS but the broader
question of how to interpret that kind of thing.
Show quoted text> The presence of a single underscore signifies an alpha/development
> release (which is what PAUSE has done for ages). The convention for
> alpha releases has been to have the first $VERSION in the file be quoted
> with an underscore (since only the first $VERSION assignment is tested
> via toolchain programs like M::B, EU::MM, and PAUSE's parser. By
> convention, the next line would be:
>
> $VERSION = eval($VERSION);
And in this AS case, it is.
Show quoted text> > However, version->new($VERSION) will die of an illegal alpha format due
> > to multiple underscores.
>
> By design. In order to support alpha versions as different from
> non-alpha (or release) versions, I had to decide how to differentiate
> the two version types. The documented method was to allow a single
> underscore followed by digits only (i.e. no more decimals or underscores).
And I'm saying that design decision was -- in hindsight -- wrong.
Moreover, for reasons I've explained elsewhere, I think the whole idea
of sorting alphas the way you ultimately chose to is wrong. Alpha is a
concept that is orthogonal to $VERSION. That PAUSE and parts of the
toolchain exploit the $VERSION = ... ; $VERSION = eval $VERSION trick
should never have been allowed into core version semantics. If it had
not, a whole raft of edge cases would have gone away.
Show quoted text> > Arguably, while "v1.54_00_01" is clearly an illegal alpha, a more
> > natural interpretation of "1.54_00_01" (without the leading-v) is that
> > it is a decimal number, not an alpha v-string.
>
> To be pedantic, "1.54_00_01" is not a v-string (it only has a single
> decimal point). It is also not a decimal number _if it is quoted_.
I'm not talking pedantry, I'm talking heuristics. There was a design
decision taken to interpret that in a certain way. I'm suggesting that
a more natural interpretation without a leading v and without multiple
decimal points is as decimal.
If you want to talk pedantry, I point out that PAUSE describes a
developer release as matching /\d\.\d+_\d/, not the version component of
a filename matching /\d\.\d+_\d+$/. So 'Foo-1.23_45_67.tar.gz' is a
valid developer filename as far as PAUSE is concerned.
Show quoted text> Apart from the usual difficulty that Perl 5.10.0 shipped with version.pm
> code that corresponds to the parsing I described above, I would have to
> completely revamp both the parser and object representation to support
> any other notation.
We don't have to change it for 5.10.X. We should change it for 5.11.X.
I'm not agreed that the representation must change or just the parsing.
But I'm not opposed. I think it would be a step forward to remove
"alpha" as a concept from version objects entirely.
Show quoted text> 2) augment the Module::Build::Version class to "try harder" iff it is
> running under ActivePerl and it catches that error. Actually,
> version.pm was designed to be easily subclassed, so it shouldn't be too
> hard to preparse the initializer string and clean it up before the
> parent class throws the error.
I've already modified Module::Build::ModuleInfo to detect that form and
just strip out the underscores before passing to Module::Build::Version.
Show quoted text> I'm afraid I have to consider this a WONTFIX for version.pm, but I will
> do what I can to make it work for M::B anyways...
I disappointed to hear that you consider this 'WONTFIX'. You can leave
M::B alone as I've already fixed this problem as described.
-- David