Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use version objects when handling version numbers #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tjormola
Copy link

Besides using decimal numbers as package version number, it's also
possible to use the dotted-decimal form (i.e. vX.Y.Z) in Perl.
Currently, MooseX::Storage uses direct numeric comparison of the version
strings which doesn't really work and it also spews
"Argument ... isn't numeric in ..." warnings should the class define its
version in dotted-decimal form. With this patch we're now creating
version objects from the version strings, which accepts both decimal
and dotted-decimal version formats as input and handles the comparison
correctly.

Besides using decimal numbers as package version number, it's also
possible to use the dotted-decimal form (i.e. vX.Y.Z) in Perl.
Currently, MooseX::Storage uses direct numeric comparison of the version
strings which doesn't really work and it also spews
"Argument ... isn't numeric in ..." warnings should the class define its
version in dotted-decimal form. With this patch we're now creating
version objects from the version strings, which accepts both decimal
and dotted-decimal version formats as input and handles the comparison
correctly.
@karenetheridge karenetheridge self-assigned this May 27, 2016
@karenetheridge
Copy link
Member

Can you clarify when this problem would occur? CPAN::Meta::Spec (https://metacpan.org/pod/CPAN::Meta::Spec#VERSION-NUMBERS) says that '1.2.3' is an illegal version format -- versions should be either numeric, or bare v-strings, either of which should compare properly using the numeric operator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants