From b90b52e02806e8d17d0d3a7eb3284d08bbd19243 Mon Sep 17 00:00:00 2001 From: David Golden Date: Wed, 5 Feb 2014 14:08:10 -0500 Subject: [PATCH] fix Module::CoreList::is_core default perl version --- dist/Module-CoreList/lib/Module/CoreList.pm | 4 ++-- dist/Module-CoreList/lib/Module/CoreList.pod | 2 +- dist/Module-CoreList/t/is_core.t | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dist/Module-CoreList/lib/Module/CoreList.pm b/dist/Module-CoreList/lib/Module/CoreList.pm index 2b0993c..828e2fa 100644 --- a/dist/Module-CoreList/lib/Module/CoreList.pm +++ b/dist/Module-CoreList/lib/Module/CoreList.pm @@ -3,7 +3,7 @@ use strict; use vars qw/$VERSION %released %version %families %upstream %bug_tracker %deprecated %delta/; use Module::CoreList::TieHashDelta; -$VERSION = '3.05'; +$VERSION = '3.06'; my $dumpinc = 0; sub import { @@ -9401,7 +9401,7 @@ sub is_core my ($module_version, $perl_version); $module_version = shift if @_ > 0; - $perl_version = @_ > 0 ? shift : $^V; + $perl_version = @_ > 0 ? shift : $]; my $first_release = first_release($module); diff --git a/dist/Module-CoreList/lib/Module/CoreList.pod b/dist/Module-CoreList/lib/Module/CoreList.pod index 17b5f84..f8e790a 100644 --- a/dist/Module-CoreList/lib/Module/CoreList.pod +++ b/dist/Module-CoreList/lib/Module/CoreList.pod @@ -83,7 +83,7 @@ Returns true if MODULE was bundled with the specified version of Perl. You can optionally specify a minimum version of the module, and can also specify a version of Perl. If a version of Perl isn't specified, -C will use the version of Perl that is running (ie C<$^V>). +C will use the numeric version of Perl that is running (ie C<$]>). If you want to specify the version of Perl, but don't care about the version of the module, pass C for the module version: diff --git a/dist/Module-CoreList/t/is_core.t b/dist/Module-CoreList/t/is_core.t index 712221f..869aa37 100644 --- a/dist/Module-CoreList/t/is_core.t +++ b/dist/Module-CoreList/t/is_core.t @@ -1,10 +1,14 @@ #!perl -w use strict; use Module::CoreList; -use Test::More tests => 33; +use Test::More tests => 34; BEGIN { require_ok('Module::CoreList'); } +# Check default perl + +ok(Module::CoreList::is_core('IO::File', $Module::CoreList::version{$]}{'IO::File'}), "is_core is self-consistent"); + ok(!Module::CoreList::is_core('Module::Path'), 'Module::Path has never been in core'); ok(!Module::CoreList::is_core('Module::Path', undef, '5.016003'), 'Module::Path has never been in core'); ok(!Module::CoreList::is_core('Module::Path', undef), 'Module::Path has never been in core'); -- 2.7.4