In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/22cd93227f3b7abe03e02d9c2e8640d09b664286?hp=8fc3dfc8f66adbf4c3082cad7d953b82e9aaeca6>
- Log ----------------------------------------------------------------- commit 22cd93227f3b7abe03e02d9c2e8640d09b664286 Author: Chris 'BinGOs' Williams <ch...@bingosnet.co.uk> Date: Mon Jan 22 20:12:44 2018 +0000 Remove Module::CoreList::TieHashDelta ----------------------------------------------------------------------- Summary of changes: MANIFEST | 1 - Porting/cmpVERSION.pl | 1 - Porting/release_managers_guide.pod | 10 +-- dist/Module-CoreList/Changes | 1 + dist/Module-CoreList/MANIFEST | 1 - dist/Module-CoreList/lib/Module/CoreList.pm | 2 +- .../lib/Module/CoreList/TieHashDelta.pm | 77 ---------------------- dist/Module-CoreList/t/find_modules.t | 8 +-- dist/Module-CoreList/t/maintainer.t | 1 - t/porting/corelist.t | 3 +- 10 files changed, 9 insertions(+), 96 deletions(-) delete mode 100644 dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm diff --git a/MANIFEST b/MANIFEST index afae22d519..96c8da5b5e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3585,7 +3585,6 @@ dist/Module-CoreList/corelist The corelist command-line utility dist/Module-CoreList/identify-dependencies A usage example for Module::CoreList dist/Module-CoreList/lib/Module/CoreList.pm Module::CoreList dist/Module-CoreList/lib/Module/CoreList.pod Module::CoreList -dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm Module::CoreList guts dist/Module-CoreList/lib/Module/CoreList/Utils.pm Module::CoreList guts dist/Module-CoreList/Makefile.PL Module::CoreList dist/Module-CoreList/MANIFEST Module::CoreList diff --git a/Porting/cmpVERSION.pl b/Porting/cmpVERSION.pl index e7ae68d6f8..4041350091 100755 --- a/Porting/cmpVERSION.pl +++ b/Porting/cmpVERSION.pl @@ -97,7 +97,6 @@ my %skip; 'dist/Attribute-Handlers/demo/MyClass.pm', # it's just demonstration code 'dist/Exporter/lib/Exporter/Heavy.pm', 'dist/Module-CoreList/lib/Module/CoreList.pm', - 'dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm', 'dist/Module-CoreList/lib/Module/CoreList/Utils.pm', 'lib/Carp/Heavy.pm', 'lib/Config.pm', # no version number but contents will vary diff --git a/Porting/release_managers_guide.pod b/Porting/release_managers_guide.pod index f43adf2a39..b2528ebe23 100644 --- a/Porting/release_managers_guide.pod +++ b/Porting/release_managers_guide.pod @@ -598,7 +598,6 @@ It may also happen that C<Module::CoreList> has been modified in blead, and hence has a new version number already. (But make sure it is not the same number as a CPAN release.) -C<$Module::CoreList::TieHashDelta::VERSION> and C<$Module::CoreList::Utils::VERSION> should always be equal to C<$Module::CoreList::VERSION>. If necessary, bump those two versions to match before proceeding. @@ -615,10 +614,6 @@ F<dist/Module-CoreList/lib/Module/CoreList.pm> F<dist/Module-CoreList/lib/Module/CoreList/Utils.pm> -=item * - -F<dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm> - =back =head4 Update C<Module::CoreList> with module version data for the new release. @@ -1452,9 +1447,8 @@ which should be identical to what is currently in blead. =item * -Bump the $VERSION in F<dist/Module-CoreList/lib/Module/CoreList.pm>, -F<dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm> and -F<dist/Module-CoreList/lib/Module/CoreList/Utils.pm>. +Bump the $VERSION in F<dist/Module-CoreList/lib/Module/CoreList.pm> +and F<dist/Module-CoreList/lib/Module/CoreList/Utils.pm>. =item * diff --git a/dist/Module-CoreList/Changes b/dist/Module-CoreList/Changes index 48e477d738..10331e0f97 100644 --- a/dist/Module-CoreList/Changes +++ b/dist/Module-CoreList/Changes @@ -1,5 +1,6 @@ 5.20180220 - Improve handling of broken versions in is_core() + - Removed Module::CoreList::TieHashDelta - Updated for v5.27.9 5.20180120 diff --git a/dist/Module-CoreList/MANIFEST b/dist/Module-CoreList/MANIFEST index 5e2592d8c7..174e5080c5 100644 --- a/dist/Module-CoreList/MANIFEST +++ b/dist/Module-CoreList/MANIFEST @@ -3,7 +3,6 @@ corelist identify-dependencies lib/Module/CoreList.pm lib/Module/CoreList.pod -lib/Module/CoreList/TieHashDelta.pm lib/Module/CoreList/Utils.pm README MANIFEST diff --git a/dist/Module-CoreList/lib/Module/CoreList.pm b/dist/Module-CoreList/lib/Module/CoreList.pm index 1fa648a2a3..fed6888cf1 100644 --- a/dist/Module-CoreList/lib/Module/CoreList.pm +++ b/dist/Module-CoreList/lib/Module/CoreList.pm @@ -15021,7 +15021,6 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'B::Op_private' => '5.027009', 'Config' => '5.027009', 'Module::CoreList' => '5.20180220', - 'Module::CoreList::TieHashDelta'=> '5.20180220', 'Module::CoreList::Utils'=> '5.20180220', }, removed => { @@ -15886,6 +15885,7 @@ sub is_core changed => { }, removed => { + 'Module::CoreList::TieHashDelta'=> 1, } }, ); diff --git a/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm b/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm deleted file mode 100644 index 3c4541a3bf..0000000000 --- a/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm +++ /dev/null @@ -1,77 +0,0 @@ -# For internal Module::CoreList use only. -package Module::CoreList::TieHashDelta; -use strict; -our $VERSION = '5.20180220'; - -sub TIEHASH { - my ($class, $changed, $removed, $parent) = @_; - - return bless { - changed => $changed, - removed => $removed, - parent => $parent, - keys_inflated => 0, - }, $class; -} - -sub FETCH { - my ($self, $key) = @_; - - if (exists $self->{changed}{$key}) { - return $self->{changed}{$key}; - } elsif (exists $self->{removed}{$key}) { - return undef; - } elsif (defined $self->{parent}) { - return $self->{parent}{$key}; - } - return undef; -} - -sub EXISTS { - my ($self, $key) = @_; - - restart: - if (exists $self->{changed}{$key}) { - return 1; - } elsif (exists $self->{removed}{$key}) { - return ''; - } elsif (defined $self->{parent}) { - $self = tied %{$self->{parent}}; #avoid extreme magic/tie recursion - goto restart; - } - return ''; -} - -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; - if (defined $self->{parent}) { - @parent_keys = keys %{$self->{parent}}; - } - - @parent_keys = grep !exists $self->{removed}{$_}, @parent_keys; - for my $key (@parent_keys) { - next if exists $self->{changed}->{$key}; - $self->{changed}{$key} = $self->{parent}{$key}; - } - - $self->{keys_inflated} = 1; - } - - keys %{$self->{changed}}; # reset each - $self->NEXTKEY; -} - -sub NEXTKEY { - my ($self) = @_; - each %{$self->{changed}}; -} - -1; diff --git a/dist/Module-CoreList/t/find_modules.t b/dist/Module-CoreList/t/find_modules.t index 112f77f8f4..7f1c408c21 100644 --- a/dist/Module-CoreList/t/find_modules.t +++ b/dist/Module-CoreList/t/find_modules.t @@ -5,20 +5,20 @@ use Test::More tests => 6; BEGIN { require_ok('Module::CoreList'); } -is_deeply([ Module::CoreList->find_modules(qr/warnings/) ], +is_deeply([ Module::CoreList->find_modules(qr/warnings/) ], [ qw(encoding::warnings warnings warnings::register) ], 'qr/warnings/'); -is_deeply([ Module::CoreList->find_modules(qr/IPC::Open/) ], +is_deeply([ Module::CoreList->find_modules(qr/IPC::Open/) ], [ qw(IPC::Open2 IPC::Open3) ], 'qr/IPC::Open/'); is_deeply([ Module::CoreList->find_modules(qr/Module::/, 5.008008) ], [], 'qr/Module::/ at 5.008008'); -is_deeply([ Module::CoreList->find_modules(qr/Test::H.*::.*s/, 5.006001, 5.007003) ], +is_deeply([ Module::CoreList->find_modules(qr/Test::H.*::.*s/, 5.006001, 5.007003) ], [ qw(Test::Harness::Assert Test::Harness::Straps) ], 'qr/Test::H.*::.*s/ at 5.006001 and 5.007003'); is_deeply([ Module::CoreList::find_modules(qr/Module::CoreList/) ], - [ qw(Module::CoreList Module::CoreList::TieHashDelta Module::CoreList::Utils) ], + [ qw(Module::CoreList Module::CoreList::TieHashDelta Module::CoreList::Utils) ], 'Module::CoreList functional' ); diff --git a/dist/Module-CoreList/t/maintainer.t b/dist/Module-CoreList/t/maintainer.t index b096269d27..1fe707f5e1 100644 --- a/dist/Module-CoreList/t/maintainer.t +++ b/dist/Module-CoreList/t/maintainer.t @@ -7,7 +7,6 @@ plan skip_all => 'These tests only run in core' my @mods = qw[ Module::CoreList -Module::CoreList::TieHashDelta Module::CoreList::Utils ]; diff --git a/t/porting/corelist.t b/t/porting/corelist.t index 820ff3e933..2ae703f6f9 100644 --- a/t/porting/corelist.t +++ b/t/porting/corelist.t @@ -8,11 +8,10 @@ use Config; require './t/test.pl'; -plan(tests => 6); +plan(tests => 5); use_ok('Module::CoreList'); use_ok('Module::CoreList::Utils'); -use_ok('Module::CoreList::TieHashDelta'); { no warnings 'once'; -- Perl5 Master Repository