Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 546e887

Browse files
committed
version-0.9918_02c
1 parent 4f18840 commit 546e887

File tree

20 files changed

+115
-49
lines changed

20 files changed

+115
-49
lines changed

MANIFEST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3268,6 +3268,7 @@ cpan/version/t/08_corelist.t Tests for version objects
32683268
cpan/version/t/09_list_util.t Tests for version objects
32693269
cpan/version/t/10cperl.t Tests for version objects
32703270
cpan/version/t/10_lyon.t Tests for version objects
3271+
cpan/version/t/11_taint.t
32713272
cpan/version/t/coretests.pm Tests for version objects
32723273
cpan/Win32API-File/buffers.h Win32API::File extension
32733274
cpan/Win32API-File/cFile.h Win32API::File extension

Porting/Maintainers.pl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ package Maintainers;
15161516
},
15171517

15181518
'version' => {
1519-
'DISTRIBUTION' => 'JPEACOCK/version-0.9917.tar.gz',
1519+
'DISTRIBUTION' => 'JPEACOCK/version-0.9918.tar.gz',
15201520
'FILES' => q[cpan/version vutil.c vutil.h vxs.inc],
15211521
'EXCLUDED' => [
15221522
qr{^vutil/lib/},
@@ -1532,13 +1532,11 @@ package Maintainers;
15321532
# to delete an entire block out of lib/version.pm, since that code is
15331533
# only necessary with the CPAN release.
15341534
'CUSTOMIZED' => [
1535-
qw( lib/version.pm lib/version/regex.pm
1536-
),
1535+
qw( lib/version.pm lib/version/regex.pm ),
15371536

15381537
# Merged upstream, waiting for new CPAN release: see CPAN RT#92721
15391538
# cperl allows the ending 'c'
1540-
qw( vutil.c vxs.inc
1541-
),
1539+
qw( vutil.c vxs.inc vutil.h ),
15421540
],
15431541

15441542
'MAP' => {

cpan/version/lib/version.pm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use strict;
66

77
use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv);
88

9-
$VERSION = '0.9917_02c';
9+
$VERSION = '0.9918_02c';
1010
$VERSION =~ s/c$//;
1111
$CLASS = 'version';
1212

@@ -15,7 +15,11 @@ require version::regex;
1515
*version::is_lax = \&version::regex::is_lax;
1616
*version::is_strict = \&version::regex::is_strict;
1717
*LAX = \$version::regex::LAX;
18+
*LAX_DECIMAL_VERSION = \$version::regex::LAX_DECIMAL_VERSION;
19+
*LAX_DOTTED_DECIMAL_VERSION = \$version::regex::LAX_DOTTED_DECIMAL_VERSION;
1820
*STRICT = \$version::regex::STRICT;
21+
*STRICT_DECIMAL_VERSION = \$version::regex::STRICT_DECIMAL_VERSION;
22+
*STRICT_DOTTED_DECIMAL_VERSION = \$version::regex::STRICT_DOTTED_DECIMAL_VERSION;
1923

2024
sub import {
2125
no strict 'refs';

cpan/version/lib/version/regex.pm

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ package version::regex;
22

33
use strict;
44

5-
use vars qw($VERSION $CLASS $STRICT $LAX);
5+
use vars qw(
6+
$VERSION $CLASS $STRICT $LAX
7+
$STRICT_DECIMAL_VERSION $STRICT_DOTTED_DECIMAL_VERSION
8+
$LAX_DECIMAL_VERSION $LAX_DOTTED_DECIMAL_VERSION
9+
);
610

7-
$VERSION = '0.9917_02c';
11+
$VERSION = '0.9918_02c';
812
$VERSION =~ s/c$//;
913

1014
#--------------------------------------------------------------------------#
@@ -59,13 +63,13 @@ my $LAX_ALPHA_PART = qr/(?:_[0-9]+c?|c?)/;
5963

6064
# Strict decimal version number.
6165

62-
my $STRICT_DECIMAL_VERSION =
66+
$STRICT_DECIMAL_VERSION =
6367
qr/ $STRICT_INTEGER_PART $FRACTION_PART? c? /x;
6468

6569
# Strict dotted-decimal version number. Must have both leading "v" and
6670
# at least three parts, to avoid confusion with decimal syntax.
6771

68-
my $STRICT_DOTTED_DECIMAL_VERSION =
72+
$STRICT_DOTTED_DECIMAL_VERSION =
6973
qr/ v $STRICT_INTEGER_PART $STRICT_DOTTED_DECIMAL_PART{2,} c? /x;
7074

7175
# Complete strict version number syntax -- should generally be used
@@ -82,7 +86,7 @@ $STRICT =
8286
# allowing an alpha suffix or allowing a leading or trailing
8387
# decimal-point
8488

85-
my $LAX_DECIMAL_VERSION =
89+
$LAX_DECIMAL_VERSION =
8690
qr/ $LAX_INTEGER_PART (?: $FRACTION_PART | \. )? $LAX_ALPHA_PART?
8791
|
8892
$FRACTION_PART $LAX_ALPHA_PART?
@@ -94,7 +98,7 @@ my $LAX_DECIMAL_VERSION =
9498
# enough, without the leading "v", Perl takes .1.2 to mean v0.1.2,
9599
# so when there is no "v", the leading part is optional
96100

97-
my $LAX_DOTTED_DECIMAL_VERSION =
101+
$LAX_DOTTED_DECIMAL_VERSION =
98102
qr/
99103
v $LAX_INTEGER_PART (?: $LAX_DOTTED_DECIMAL_PART+ $LAX_ALPHA_PART? )?
100104
|

cpan/version/t/01base.t

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ use Test::More qw/no_plan/;
88
use File::Spec;
99

1010
BEGIN {
11-
my $coretests = File::Spec->catpath(
12-
(File::Spec->splitpath($0))[0,1], 'coretests.pm'
11+
my $coretests = File::Spec->rel2abs(
12+
File::Spec->catpath(
13+
(File::Spec->splitpath($0))[0,1], 'coretests.pm'
14+
)
1315
);
1416
require $coretests;
15-
use_ok('version', 0.9917);
17+
use_ok('version', 0.9918);
1618
}
1719

1820
BaseTests("version","new","qv");

cpan/version/t/02derived.t

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ use File::Spec;
99
use File::Temp qw/tempfile/;
1010

1111
BEGIN {
12-
my $coretests = File::Spec->catpath(
13-
(File::Spec->splitpath($0))[0,1], 'coretests.pm'
12+
my $coretests = File::Spec->rel2abs(
13+
File::Spec->catpath(
14+
(File::Spec->splitpath($0))[0,1], 'coretests.pm'
15+
)
1416
);
1517
require $coretests;
16-
use_ok("version", 0.9917);
18+
use_ok("version", 0.9918);
1719
# If we made it this far, we are ok.
1820
}
1921

cpan/version/t/03require.t

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@ use Test::More qw/no_plan/;
88
use File::Spec;
99

1010
BEGIN {
11-
my $coretests = File::Spec->catpath(
12-
(File::Spec->splitpath($0))[0,1], 'coretests.pm'
11+
my $coretests = File::Spec->rel2abs(
12+
File::Spec->catpath(
13+
(File::Spec->splitpath($0))[0,1], 'coretests.pm'
14+
)
1315
);
1416
require $coretests;
1517
}
1618

1719
# Don't want to use, because we need to make sure that the import doesn't
1820
# fire just yet (some code does this to avoid importing qv() and delare()).
1921
require_ok("version");
20-
is $version::VERSION, '0.9917_02', "Make sure we have the correct class";
22+
is $version::VERSION, '0.9918_02', "Make sure we have the correct class";
2123
ok(!"main"->can("qv"), "We don't have the imported qv()");
2224
ok(!"main"->can("declare"), "We don't have the imported declare()");
2325

cpan/version/t/04strict_lax.t

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,21 @@ SKIP: {
2121
($v) = ( "snapshot-v1.2.3ga-001-432" =~ /($version::STRICT)/ );
2222
is $v, 'v1.2.3', "Extract just the version: $v";
2323
}
24+
25+
is ref($version::LAX_DECIMAL_VERSION), 'Regexp', 'Can see $version::LAX_DECIMAL_VERSION '.$version::LAX_DECIMAL_VERSION ;
26+
is ref($version::LAX_DOTTED_DECIMAL_VERSION), 'Regexp', 'Can see $version::LAX_DOTTED_DECIMAL_VERSION '.$version::LAX_DOTTED_DECIMAL_VERSION ;
27+
is ref($version::STRICT_DECIMAL_VERSION), 'Regexp', 'Can see $version::STRICT_DECIMAL_VERSION '.$version::STRICT_DECIMAL_VERSION;
28+
is ref($version::STRICT_DOTTED_DECIMAL_VERSION), 'Regexp', 'Can see $version::STRICT_DOTTED_DECIMAL_VERSION '.$version::STRICT_DOTTED_DECIMAL_VERSION;
29+
{ # https://rt.cpan.org/Ticket/Display.html?id=119669
30+
($v) = ( "snapshot-1.2.3ga-001-432" =~ /($version::LAX_DOTTED_DECIMAL_VERSION)/ );
31+
is $v, '1.2.3', "Extract just the version: $v";
32+
($v) = ( "snapshot-1.2ga-001-432" =~ /($version::LAX_DECIMAL_VERSION)/ );
33+
is $v, '1.2', "Extract just the version: $v";
34+
($v) = ( "snapshot-v1.2.3ga-001-432" =~ /($version::STRICT_DOTTED_DECIMAL_VERSION)/ );
35+
is $v, 'v1.2.3', "Extract just the version: $v";
36+
($v) = ( "snapshot-1.2ga-001-432" =~ /($version::STRICT_DECIMAL_VERSION)/ );
37+
is $v, '1.2', "Extract just the version: $v";
38+
}
2439
}
2540

2641

cpan/version/t/05sigdie.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ BEGIN {
1414
}
1515

1616
BEGIN {
17-
use version 0.9917;
17+
use version 0.9918;
1818
}
1919

2020
pass "Didn't get caught by the wrong DIE handler, which is a good thing";

cpan/version/t/06noop.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Test::More qw/no_plan/;
88

99
BEGIN {
10-
use_ok('version', 0.9917);
10+
use_ok('version', 0.9918);
1111
}
1212

1313
my $v1 = version->new('1.2');

0 commit comments

Comments
 (0)