[packages/pldcpan] - 1.63; use metacpan.org instead of deprecated search.cpan.org
arekm
arekm at pld-linux.org
Tue Jul 10 09:23:01 CEST 2018
commit 6687e291b338f674cedbbb8ca2542e586cf4b66e
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Tue Jul 10 09:22:52 2018 +0200
- 1.63; use metacpan.org instead of deprecated search.cpan.org
pldcpan.pl | 22 +++++++++++-----------
pldcpan.spec | 4 ++--
2 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/pldcpan.spec b/pldcpan.spec
index 32ff312..ae0aea8 100644
--- a/pldcpan.spec
+++ b/pldcpan.spec
@@ -2,8 +2,8 @@
Summary: PLD Linux script to create RPMS from CPAN modules
Summary(pl.UTF-8): Skrypt PLD tworzący pakiety RPM z modułów z CPAN
Name: pldcpan
-Version: 1.62
-Release: 3
+Version: 1.63
+Release: 1
License: GPL
Group: Development/Languages/Perl
Source0: %{name}.pl
diff --git a/pldcpan.pl b/pldcpan.pl
index 6b72691..f3ea2c0 100755
--- a/pldcpan.pl
+++ b/pldcpan.pl
@@ -17,7 +17,7 @@ This program uncompresses given archives in the current directory and -- more
or less successfully -- attempts to write corresponding perl-*.spec files.
DIST can be a directory, a compressed archive, URL to fetch or module name
-(Foo::Bar) to be found on search.cpan.org.
+(Foo::Bar) to be found on metacpan.org.
=head1 TODO
@@ -78,7 +78,7 @@ use File::Find::Rule ();
use Module::CoreList ();
use LWP::Simple ();
-our $VERSION = 1.62;
+our $VERSION = 1.63;
our %opts;
GetOptions(\%opts, 'verbose|v', 'modulebuild|B', 'makemaker|M', 'force');
eval "use Data::Dump qw(pp);" if $opts{verbose};
@@ -100,7 +100,7 @@ and -- more or less successfully -- attempts to write corresponding
perl-*.spec files.
DIST can be a directory, a compressed archive, URL to fetch or module
-name (Foo::Bar) to be found on search.cpan.org.
+name (Foo::Bar) to be found on metacpan.org.
$Id$
EOF
@@ -663,14 +663,14 @@ for my $arg (@ARGV) {
$arg = $tarname;
}
elsif ($arg =~ /^[a-z\d_]+(?:(?:::|-)[a-z\d_]+)*$/i) {
- (my $dist = $arg) =~ s/::/-/g;
- warn " -- searching for '$dist' on search.cpan.org\n";
- my $scpan = LWP::Simple::get("http://search.cpan.org/dist/$dist/");
+ my $dist = $arg;
+ warn " -- searching for '$dist' on metacpan.org\n";
+ my $scpan = LWP::Simple::get("https://fastapi.metacpan.org/v1/download_url/$dist");
if ( !defined $scpan
- || $scpan =~ /cannot be found, did you mean one of these/
- || $scpan !~ m#<a href="/CPAN/authors/id/([^"]+/([^/"]+))">Download</a>#)
+ || $scpan =~ /Not found/
+ || $scpan !~ m#"download_url" : ".*/authors/id/([^"]+/([^/"]+))"#)
{
- warn " !! searching for '$dist' on search.cpan.org failed\n";
+ warn " !! searching for '$dist' on metacpan.org failed\n";
next;
}
$info->{url} = "http://www.cpan.org/modules/by-authors/id/$1";
@@ -827,9 +827,9 @@ Source0: http://www.cpan.org/modules/by-module/[% pdir %]/%{pdir}-%{version}.tar
[% END -%]
# generic URL, check or change before uncommenting
[% IF pnam -%]
-#URL: http://search.cpan.org/dist/[% pdir %]-[% pnam %]/
+#URL: https://metacpan.org/release/[% pdir %]-[% pnam %]/
[% ELSE -%]
-#URL: http://search.cpan.org/dist/[% pdir %]/
+#URL: https://metacpan.org/release/[% pdir %]/
[% END -%]
[% IF uses_module_build -%]
[% req = 'perl-Module-Build' -%]
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/pldcpan.git/commitdiff/6687e291b338f674cedbbb8ca2542e586cf4b66e
More information about the pld-cvs-commit
mailing list