fix Module::CoreList::is_core default perl version
authorDavid Golden <dagolden@cpan.org>
Wed, 5 Feb 2014 19:08:10 +0000 (14:08 -0500)
committerDavid Golden <dagolden@cpan.org>
Wed, 5 Feb 2014 19:08:50 +0000 (14:08 -0500)
dist/Module-CoreList/lib/Module/CoreList.pm
dist/Module-CoreList/lib/Module/CoreList.pod
dist/Module-CoreList/t/is_core.t

index 2b0993c..828e2fa 100644 (file)
@@ -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);
 
index 17b5f84..f8e790a 100644 (file)
@@ -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<is_core()> will use the version of Perl that is running (ie C<$^V>).
+C<is_core()> 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<undef> for the module version:
index 712221f..869aa37 100644 (file)
@@ -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');