From 0e20d2c1d92e001fde23a427d3e730d46d320da0 Mon Sep 17 00:00:00 2001 From: Martin McGrath Date: Wed, 23 May 2018 10:25:11 +0100 Subject: [PATCH 1/3] Change search.cpan.org/dist to metacpan.org URLs --- corpus/CL018_yaml.meta | 2 +- lib/CPAN/Meta/Converter.pm | 2 +- lib/CPAN/Meta/Spec.pm | 4 ++-- t/converter-fragments.t | 2 +- t/data-fail/META-2.json | 2 +- t/data-fixable/META-2.json | 2 +- t/data-fixable/invalid-meta-spec-version.json | 2 +- t/data-fixable/meta-spec-version-trailing-zeros.json | 2 +- t/data-fixable/restrictive-2.json | 2 +- t/data-fixable/version-ranges-2.json | 2 +- t/data-test/META-2.json | 2 +- t/data-test/provides-version-missing.json | 2 +- t/data-test/restricted-2.json | 2 +- t/data-test/version-not-normal.json | 2 +- t/data-test/version-ranges-2.json | 2 +- t/data-test/x_deprecated-META.json | 2 +- t/data-valid/META-2.json | 2 +- t/merge.t | 6 +++--- t/meta-obj.t | 4 ++-- t/no-index.t | 2 +- t/optional_feature-merge.t | 2 +- t/save-load.t | 2 +- 22 files changed, 26 insertions(+), 26 deletions(-) diff --git a/corpus/CL018_yaml.meta b/corpus/CL018_yaml.meta index 4bbac95..7088efe 100644 --- a/corpus/CL018_yaml.meta +++ b/corpus/CL018_yaml.meta @@ -9,7 +9,7 @@ "perl_5" ], "meta-spec" : { - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "url" : "https://metacpan.org/pod/CPAN::Meta::Spec", "version" : "2" }, "name" : "Compiler-Lexer", diff --git a/lib/CPAN/Meta/Converter.pm b/lib/CPAN/Meta/Converter.pm index 1bd116b..e12081c 100644 --- a/lib/CPAN/Meta/Converter.pm +++ b/lib/CPAN/Meta/Converter.pm @@ -76,7 +76,7 @@ sub _dclone { } my %known_specs = ( - '2' => 'http://search.cpan.org/perldoc?CPAN::Meta::Spec', + '2' => 'https://metacpan.org/pod/CPAN::Meta::Spec', '1.4' => 'http://module-build.sourceforge.net/META-spec-v1.4.html', '1.3' => 'http://module-build.sourceforge.net/META-spec-v1.3.html', '1.2' => 'http://module-build.sourceforge.net/META-spec-v1.2.html', diff --git a/lib/CPAN/Meta/Spec.pm b/lib/CPAN/Meta/Spec.pm index 825ef98..84d7c3f 100644 --- a/lib/CPAN/Meta/Spec.pm +++ b/lib/CPAN/Meta/Spec.pm @@ -362,7 +362,7 @@ Example: 'meta-spec' => { version => '2', - url => 'http://search.cpan.org/perldoc?CPAN::Meta::Spec', + url => 'https://metacpan.org/pod/CPAN::Meta::Spec', } (Spec 1.2) [required] {Map} @@ -391,7 +391,7 @@ For the version 2 spec, either of these are recommended: =for :list * C -* C +* C =back diff --git a/t/converter-fragments.t b/t/converter-fragments.t index 8f8697d..42322c1 100644 --- a/t/converter-fragments.t +++ b/t/converter-fragments.t @@ -11,7 +11,7 @@ delete $ENV{CPAN_META_JSON_DECODER}; my $spec2 = { version => '2', - url => 'http://search.cpan.org/perldoc?CPAN::Meta::Spec', + url => 'https://metacpan.org/pod/CPAN::Meta::Spec', }; my @cases = ( diff --git a/t/data-fail/META-2.json b/t/data-fail/META-2.json index 4cad8f3..589ed11 100644 --- a/t/data-fail/META-2.json +++ b/t/data-fail/META-2.json @@ -7,7 +7,7 @@ "generated_by" : "Module::Build version 0.36", "meta-spec" : { "version" : "2", - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec" + "url" : "https://metacpan.org/pod/CPAN::Meta::Spec" }, "name" : "Module-Build", "dynamic_config" : 1, diff --git a/t/data-fixable/META-2.json b/t/data-fixable/META-2.json index 6734399..cd28769 100644 --- a/t/data-fixable/META-2.json +++ b/t/data-fixable/META-2.json @@ -7,7 +7,7 @@ "generated_by" : "Module::Build version 0.36", "meta-spec" : { "version" : "2", - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec" + "url" : "https://metacpan.org/pod/CPAN::Meta::Spec" }, "version" : "0.36", "name" : "Module-Build", diff --git a/t/data-fixable/invalid-meta-spec-version.json b/t/data-fixable/invalid-meta-spec-version.json index 183781b..ead6d7f 100644 --- a/t/data-fixable/invalid-meta-spec-version.json +++ b/t/data-fixable/invalid-meta-spec-version.json @@ -11,7 +11,7 @@ "generated_by" : "Module::Build version 0.36", "meta-spec" : { "version" : "99", - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec" + "url" : "https://metacpan.org/pod/CPAN::Meta::Spec" }, "version" : "0.36", "name" : "Module-Build", diff --git a/t/data-fixable/meta-spec-version-trailing-zeros.json b/t/data-fixable/meta-spec-version-trailing-zeros.json index 3990195..2007d6e 100644 --- a/t/data-fixable/meta-spec-version-trailing-zeros.json +++ b/t/data-fixable/meta-spec-version-trailing-zeros.json @@ -11,7 +11,7 @@ "generated_by" : "Module::Build version 0.36", "meta-spec" : { "version" : "2.0", - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec" + "url" : "https://metacpan.org/pod/CPAN::Meta::Spec" }, "version" : "0.36", "name" : "Module-Build", diff --git a/t/data-fixable/restrictive-2.json b/t/data-fixable/restrictive-2.json index 2fdd9fb..6b8e0e9 100644 --- a/t/data-fixable/restrictive-2.json +++ b/t/data-fixable/restrictive-2.json @@ -11,7 +11,7 @@ "generated_by" : "Module::Build version 0.36", "meta-spec" : { "version" : "2", - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec" + "url" : "https://metacpan.org/pod/CPAN::Meta::Spec" }, "version" : "0.36", "name" : "Module-Build", diff --git a/t/data-fixable/version-ranges-2.json b/t/data-fixable/version-ranges-2.json index 8c13c75..432e745 100644 --- a/t/data-fixable/version-ranges-2.json +++ b/t/data-fixable/version-ranges-2.json @@ -2,7 +2,7 @@ "generated_by" : "Module::Build version 0.36", "meta-spec" : { "version" : "2", - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec" + "url" : "https://metacpan.org/pod/CPAN::Meta::Spec" }, "abstract" : "stuff", "version" : "0.36", diff --git a/t/data-test/META-2.json b/t/data-test/META-2.json index e0c7e32..d09b71e 100644 --- a/t/data-test/META-2.json +++ b/t/data-test/META-2.json @@ -11,7 +11,7 @@ "generated_by" : "Module::Build version 0.36", "meta-spec" : { "version" : "2", - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec" + "url" : "https://metacpan.org/pod/CPAN::Meta::Spec" }, "version" : "0.36", "name" : "Module-Build", diff --git a/t/data-test/provides-version-missing.json b/t/data-test/provides-version-missing.json index 2264e92..eaa334f 100644 --- a/t/data-test/provides-version-missing.json +++ b/t/data-test/provides-version-missing.json @@ -11,7 +11,7 @@ "generated_by" : "Module::Build version 0.36", "meta-spec" : { "version" : "2", - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec" + "url" : "https://metacpan.org/pod/CPAN::Meta::Spec" }, "version" : "0.36", "name" : "Module-Build", diff --git a/t/data-test/restricted-2.json b/t/data-test/restricted-2.json index 88886db..2cb9276 100644 --- a/t/data-test/restricted-2.json +++ b/t/data-test/restricted-2.json @@ -11,7 +11,7 @@ "generated_by" : "Module::Build version 0.36", "meta-spec" : { "version" : "2", - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec" + "url" : "https://metacpan.org/pod/CPAN::Meta::Spec" }, "version" : "0.36", "name" : "Module-Build", diff --git a/t/data-test/version-not-normal.json b/t/data-test/version-not-normal.json index a275a86..431d663 100644 --- a/t/data-test/version-not-normal.json +++ b/t/data-test/version-not-normal.json @@ -2,7 +2,7 @@ "generated_by" : "Module::Build version 0.36", "meta-spec" : { "version" : "2", - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec" + "url" : "https://metacpan.org/pod/CPAN::Meta::Spec" }, "abstract" : "stuff", "version" : "0.36", diff --git a/t/data-test/version-ranges-2.json b/t/data-test/version-ranges-2.json index 6d23170..7bf7b0d 100644 --- a/t/data-test/version-ranges-2.json +++ b/t/data-test/version-ranges-2.json @@ -2,7 +2,7 @@ "generated_by" : "Module::Build version 0.36", "meta-spec" : { "version" : "2", - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec" + "url" : "https://metacpan.org/pod/CPAN::Meta::Spec" }, "abstract" : "stuff", "version" : "0.36", diff --git a/t/data-test/x_deprecated-META.json b/t/data-test/x_deprecated-META.json index 07a42e4..a98da70 100644 --- a/t/data-test/x_deprecated-META.json +++ b/t/data-test/x_deprecated-META.json @@ -22,7 +22,7 @@ "perl_5" ], "meta-spec" : { - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "url" : "https://metacpan.org/pod/CPAN::Meta::Spec", "version" : 2 }, "name" : "Dist-Zilla-Plugin-Test-EOL", diff --git a/t/data-valid/META-2.json b/t/data-valid/META-2.json index a2b6656..fe74fa8 100644 --- a/t/data-valid/META-2.json +++ b/t/data-valid/META-2.json @@ -19,7 +19,7 @@ "perl_5" ], "meta-spec" : { - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "url" : "https://metacpan.org/pod/CPAN::Meta::Spec", "version" : "2" }, "name" : "Module-Build", diff --git a/t/merge.t b/t/merge.t index 73e8c3e..5930f77 100644 --- a/t/merge.t +++ b/t/merge.t @@ -33,7 +33,7 @@ my %base = ( }, }, 'meta-spec' => { - url => "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + url => "https://metacpan.org/pod/CPAN::Meta::Spec", version => 2, }, ); @@ -101,7 +101,7 @@ my %first_expected = ( }, dynamic_config => 1, 'meta-spec' => { - url => "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + url => "https://metacpan.org/pod/CPAN::Meta::Spec", version => 2, }, ); @@ -129,7 +129,7 @@ my %provides_merge_expected = ( }, }, 'meta-spec' => { - url => "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + url => "https://metacpan.org/pod/CPAN::Meta::Spec", version => 2, }, ); diff --git a/t/meta-obj.t b/t/meta-obj.t index 57b9185..7e82119 100644 --- a/t/meta-obj.t +++ b/t/meta-obj.t @@ -70,7 +70,7 @@ my $distmeta = { keywords => [ qw/ toolchain cpan dual-life / ], 'meta-spec' => { version => '2', - url => 'http://search.cpan.org/perldoc?CPAN::Meta::Spec', + url => 'https://metacpan.org/pod/CPAN::Meta::Spec', }, generated_by => 'Module::Build version 0.36', x_authority => 'cpan:FLORA', @@ -148,7 +148,7 @@ is_deeply( $meta->meta_spec, { version => '2', - url => 'http://search.cpan.org/perldoc?CPAN::Meta::Spec', + url => 'https://metacpan.org/pod/CPAN::Meta::Spec', }, '->meta_spec', ); diff --git a/t/no-index.t b/t/no-index.t index 0927ad2..a02ed13 100644 --- a/t/no-index.t +++ b/t/no-index.t @@ -18,7 +18,7 @@ my %distmeta = ( license => [ 'perl_5' ], 'meta-spec' => { version => '2', - url => 'http://search.cpan.org/perldoc?CPAN::Meta::Spec', + url => 'https://metacpan.org/pod/CPAN::Meta::Spec', }, dynamic_config => 1, generated_by => 'Module::Build version 0.36', diff --git a/t/optional_feature-merge.t b/t/optional_feature-merge.t index 7036cdc..bbe426c 100644 --- a/t/optional_feature-merge.t +++ b/t/optional_feature-merge.t @@ -32,7 +32,7 @@ my %base = ( }, }, 'meta-spec' => { - url => "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + url => "https://metacpan.org/pod/CPAN::Meta::Spec", version => 2, }, ); diff --git a/t/save-load.t b/t/save-load.t index ef596f8..c6740cb 100644 --- a/t/save-load.t +++ b/t/save-load.t @@ -70,7 +70,7 @@ my $distmeta = { keywords => [ qw/ toolchain cpan dual-life / ], 'meta-spec' => { version => '2', - url => 'http://search.cpan.org/perldoc?CPAN::Meta::Spec', + url => 'https://metacpan.org/pod/CPAN::Meta::Spec', }, generated_by => 'Module::Build version 0.36', }; From 7b1e271bcceeaf384496116e2da0b6065c15cc42 Mon Sep 17 00:00:00 2001 From: Martin McGrath Date: Wed, 23 May 2018 11:23:20 +0100 Subject: [PATCH 2/3] Update POD --- lib/CPAN/Meta/Spec.pm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/CPAN/Meta/Spec.pm b/lib/CPAN/Meta/Spec.pm index 84d7c3f..fb71a59 100644 --- a/lib/CPAN/Meta/Spec.pm +++ b/lib/CPAN/Meta/Spec.pm @@ -387,11 +387,8 @@ This is a I of the metadata specification document corresponding to the given version. This is strictly for human-consumption and should not impact the interpretation of the document. -For the version 2 spec, either of these are recommended: - -=for :list -* C -* C +For the version 2 spec, C +is recommended. =back From de8b256083b7a034f3db363fd9f536806ad1014d Mon Sep 17 00:00:00 2001 From: Martin McGrath Date: Wed, 23 May 2018 11:44:02 +0100 Subject: [PATCH 3/3] POD fix remove reference to search.cpan.org --- lib/CPAN/Meta/Spec.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CPAN/Meta/Spec.pm b/lib/CPAN/Meta/Spec.pm index fb71a59..69eea59 100644 --- a/lib/CPAN/Meta/Spec.pm +++ b/lib/CPAN/Meta/Spec.pm @@ -661,8 +661,8 @@ Example: This describes all packages provided by this distribution. This information is used by distribution and automation mechanisms like -PAUSE, CPAN, metacpan.org and search.cpan.org to build indexes saying in -which distribution various packages can be found. +PAUSE, CPAN, and metacpan.org to build indexes saying in which +distribution various packages can be found. The keys of C are package names that can be found within the distribution. If a package name key is provided, it must