Skip to content

Commit 0eda2a5

Browse files
committed
Address #22693 - Blead 'Breaks' Module::CoreList
This has always been the way, but have added some sanity checks to is_core.t That leaves maintainer.t as canary for a release manager who has neglected to shim Module::CoreList for a bumped Perl version.
1 parent a6f05e6 commit 0eda2a5

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

dist/Module-CoreList/t/is_core.t

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@ use Test::More tests => 44;
55

66
BEGIN { require_ok('Module::CoreList'); }
77

8+
# Check that there is a release entry for the current perl version
9+
my $released = $Module::CoreList::released{ $] };
10+
# duplicate fetch to avoid 'used only once: possible typo' warning
11+
$released = $Module::CoreList::released{ $] };
12+
813
# Check default perl
914

10-
ok(Module::CoreList::is_core('IO::File', $Module::CoreList::version{$]}{'IO::File'}), "is_core is self-consistent");
15+
SKIP: {
16+
skip 'CPAN release being tested aginst blead', 1 unless $released;
17+
ok(Module::CoreList::is_core('IO::File', $Module::CoreList::version{$]}{'IO::File'}), "is_core is self-consistent");
18+
}
1119

1220
ok(!Module::CoreList::is_core('Module::Path'), 'Module::Path has never been in core');
1321
ok(!Module::CoreList::is_core('Module::Path', undef, '5.016003'), 'Module::Path has never been in core');
@@ -21,7 +29,11 @@ ok(!Module::CoreList::is_core('List::Util::PP', undef, '5.018001'), 'List::Util:
2129
# Carp has always been a core module
2230
ok(Module::CoreList::is_core('Carp', undef, '5'), 'Carp was a core module in first release of perl 5');
2331
ok(Module::CoreList::is_core('Carp', undef, '5.019004'), 'Carp was still a core module in 5.19.4');
24-
ok(Module::CoreList::is_core('Carp'), "Carp should be a core module whatever version of perl you're running");
32+
33+
SKIP: {
34+
skip 'CPAN release being tested aginst blead', 1 unless $released;
35+
ok(Module::CoreList::is_core('Carp'), "Carp should be a core module whatever version of perl you're running");
36+
}
2537

2638
ok(Module::CoreList::is_core('attributes', undef, '5.00503') == 0, "attributes weren't in 5.00503");
2739
ok(Module::CoreList::is_core('attributes', undef, '5.006001') == 1, "attributes were in 5.6.1");

0 commit comments

Comments
 (0)