1CPAN::Version(3) User Contributed Perl Documentation CPAN::Version(3)
2
3
4
6 CPAN::Version - utility functions to compare CPAN versions
7
9 use CPAN::Version;
10
11 CPAN::Version->vgt("1.1","1.1.1"); # 1 bc. 1.1 > 1.001001
12
13 CPAN::Version->vlt("1.1","1.1"); # 0 bc. 1.1 not < 1.1
14
15 CPAN::Version->vcmp("1.1","1.1.1"); # 1 bc. first is larger
16
17 CPAN::Version->vcmp("1.1.1","1.1"); # -1 bc. first is smaller
18
19 CPAN::Version->readable(v1.2.3); # "v1.2.3"
20
21 CPAN::Version->vstring("v1.2.3"); # v1.2.3
22
23 CPAN::Version->float2vv(1.002003); # "v1.2.3"
24
26 This module mediates between some version that perl sees in a package
27 and the version that is published by the CPAN indexer.
28
29 It's only written as a helper module for both CPAN.pm and CPANPLUS.pm.
30
31 As it stands it predates version.pm but has the same goal: make version
32 strings visible and comparable.
33
35 This program is free software; you can redistribute it and/or modify it
36 under the same terms as Perl itself.
37
38
39
40perl v5.36.0 2022-07-22 CPAN::Version(3)