Acme-CPANModules-VersionNumber-Perl
view release on metacpan or search on metacpan
lib/Acme/CPANModules/VersionNumber/Perl.pm view on Meta::CPAN
0.02.1 will actually *decrease* your version number. I recommend using x.yyy if
you use decimal form, i.e. start from 0.001 and not 0.01. It will support you
going smoothly to dotted decimal if you decide to do it one day.
The numification is also problematic when a number part is > 999, e.g. 1.2.1234.
This breaks version comparison when comparison is done with version->parse().
Aside from the abovementioned two styles, there is another: CPAN
distributions/modules can add an underscore in the last part of the version
number to signify alpha/dev/trial release, e.g. 1.2.3_01. PAUSE will not index
such releases, so testers will need to specify an explicit version number to
install, e.g. `cpanm Foo@1.2.3_01`. In some cases you need to pay attention when
comparing this kind of version numbers.
## Checking if a string is a valid version number
To check if a string is a valid Perl version number, you can do:
version->parse($str)
which will die if C<$str> contains an invalid version string. version.pm can
lib/Acme/CPANModules/VersionNumber/Perl.pm view on Meta::CPAN
0.02.1 will actually I<decrease> your version number. I recommend using x.yyy if
you use decimal form, i.e. start from 0.001 and not 0.01. It will support you
going smoothly to dotted decimal if you decide to do it one day.
The numification is also problematic when a number part is > 999, e.g. 1.2.1234.
This breaks version comparison when comparison is done with version->parse().
Aside from the abovementioned two styles, there is another: CPAN
distributions/modules can add an underscore in the last part of the version
number to signify alpha/dev/trial release, e.g. 1.2.3_01. PAUSE will not index
such releases, so testers will need to specify an explicit version number to
install, e.g. C<cpanm Foo@1.2.3_01>. In some cases you need to pay attention when
comparing this kind of version numbers.
=head2 Checking if a string is a valid version number
To check if a string is a valid Perl version number, you can do:
version->parse($str)
which will die if C<$str> contains an invalid version string. version.pm can
lib/Acme/CPANModules/VersionNumber/Perl.pm view on Meta::CPAN
perlancar <perlancar@cpan.org>
=head1 CONTRIBUTING
To contribute, you can send patches by email/via RT, or send pull requests on
GitHub.
Most of the time, you don't need to build the distribution yourself. You can
simply modify the code, then test via:
% prove -l
If you want to build the distribution (e.g. to try to install it locally on your
system), you can install L<Dist::Zilla>,
L<Dist::Zilla::PluginBundle::Author::PERLANCAR>,
L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond
that are considered a bug and can be reported to me.
lib/Acme/CPANModules/VersionNumber/Perl.pm view on Meta::CPAN
This software is copyright (c) 2023 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Acme-CPANModules-VersionNumber-Perl>
When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.
=cut
( run in 0.942 second using v1.01-cache-2.11-cpan-5a3173703d6 )