In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/6af6e5991eb39394eeb1779d27a71f12c051a122?hp=ea319c81d6264975e581fc37c96a23a66e426632>
- Log ----------------------------------------------------------------- commit 6af6e5991eb39394eeb1779d27a71f12c051a122 Author: Karen Etheridge <[email protected]> Date: Fri May 6 13:36:17 2016 -0700 fix Module::CoreList::is_core bounds checking for specific module versions ----------------------------------------------------------------------- Summary of changes: dist/Module-CoreList/Changes | 6 +++++- dist/Module-CoreList/lib/Module/CoreList.pm | 2 +- dist/Module-CoreList/t/is_core.t | 9 ++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/dist/Module-CoreList/Changes b/dist/Module-CoreList/Changes index b254182..0c20e2c 100644 --- a/dist/Module-CoreList/Changes +++ b/dist/Module-CoreList/Changes @@ -1,8 +1,12 @@ + + - fixed edge-case checking in is_core() (checking for a specific version of + a module returned false for the first perl release that contained it) + 5.20160429 - Updated for v5.22.2 5.20160320 - - Updated vor v5.23.9 + - Updated for v5.23.9 5.20160228 - [perl #127624] corelist: wrong Digest::SHA version in 5.18.4 diff --git a/dist/Module-CoreList/lib/Module/CoreList.pm b/dist/Module-CoreList/lib/Module/CoreList.pm index e179164..b1851e8 100644 --- a/dist/Module-CoreList/lib/Module/CoreList.pm +++ b/dist/Module-CoreList/lib/Module/CoreList.pm @@ -12478,7 +12478,7 @@ sub is_core } RELEASE: foreach my $prn (@releases) { - next RELEASE if $prn <= $first_release; + next RELEASE if $prn < $first_release; last RELEASE if $prn > $perl_version; next unless defined(my $next_module_version = $delta{$prn}->{changed}->{$module}); diff --git a/dist/Module-CoreList/t/is_core.t b/dist/Module-CoreList/t/is_core.t index cc06a21..1ddc260 100644 --- a/dist/Module-CoreList/t/is_core.t +++ b/dist/Module-CoreList/t/is_core.t @@ -1,7 +1,7 @@ #!perl -w use strict; use Module::CoreList; -use Test::More tests => 38; +use Test::More tests => 43; BEGIN { require_ok('Module::CoreList'); } @@ -28,6 +28,13 @@ ok(Module::CoreList::is_core('attributes', undef, '5.006001') == 1, "attributes ok(Module::CoreList::is_core('Pod::Plainer', undef, '5.012001') == 1, "Pod::Plainer was core in 5.12.1"); ok(Module::CoreList::is_core('Pod::Plainer', undef, '5.016003') == 0, "Pod::Plainer was removed in 5.13.1"); +ok(!Module::CoreList::is_core('File::Temp', 0, '5.006'), 'File::Temp is not in 5.006000'); +ok(Module::CoreList::is_core('File::Temp', 0, '5.006001'), 'File::Temp is in 5.006001'); +ok(!Module::CoreList::is_core('File::Temp', '0.12', '5.006'), 'File::Temp 0.12 is not in 5.006000'); +ok(Module::CoreList::is_core('File::Temp', '0.12', '5.006001'), 'File::Temp 0.12 is in 5.006001'); +ok(Module::CoreList::is_core('File::Temp', '0.12', '5.006002'), 'File::Temp 0.12 is in 5.006002'); + + # history of module 'encoding' in core # version 1.00 included in 5.007003 # version 1.35 included in 5.008 -- Perl5 Master Repository
