summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorNiko Tyni <ntyni@debian.org>2016-04-26 17:34:51 -0400
committerRicardo Signes <rjbs@cpan.org>2016-04-26 17:41:35 -0400
commit9baa246cc16b03dcc8354a141d54bb5c40fb99b1 (patch)
treeb17a549fa37a1d697333dd3c8298e17be2498e87 /dist
parent86ee67245c9257164559d6ced91f64313cea334f (diff)
downloadperl-9baa246cc16b03dcc8354a141d54bb5c40fb99b1.tar.gz
corelist: silence deep recursion warning with %version
Diffstat (limited to 'dist')
-rw-r--r--dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm3
-rw-r--r--dist/Module-CoreList/t/corelist.t8
2 files changed, 10 insertions, 1 deletions
diff --git a/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm b/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm
index 94507d7f7c..c58bc4cc73 100644
--- a/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm
+++ b/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm
@@ -48,6 +48,9 @@ sub FIRSTKEY {
my ($self) = @_;
if (not $self->{keys_inflated}) {
+ # exceeds the warning limit of 100 calls since 5.23.2
+ no warnings 'recursion';
+
# This inflates the whole set of hashes... Somewhat expensive, but saves
# many tied hash calls later.
my @parent_keys;
diff --git a/dist/Module-CoreList/t/corelist.t b/dist/Module-CoreList/t/corelist.t
index db09f48f4e..4adbbe94f0 100644
--- a/dist/Module-CoreList/t/corelist.t
+++ b/dist/Module-CoreList/t/corelist.t
@@ -1,7 +1,7 @@
#!perl -w
use strict;
use Module::CoreList;
-use Test::More tests => 32;
+use Test::More tests => 34;
BEGIN { require_ok('Module::CoreList'); }
@@ -105,6 +105,12 @@ is(Module::CoreList::removed_from('CPANPLUS::inc'), 5.010001,
cmp_ok($warnings_count, '==', 0,
"an undefined version does not produce warnings rt#123556");
+
+ ok(keys %{$Module::CoreList::version{5.023002}} > 0,
+ "have recent enough data to test for deep recursion warnings");
+
+ cmp_ok($warnings_count, '==', 0,
+ "no deep recursion warnings for newer perl versions");
}
ok(! defined(Module::CoreList->find_version()),