bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix build-aux/announce-gen for Perl 5.14


From: Jim Meyering
Subject: Re: Fix build-aux/announce-gen for Perl 5.14
Date: Tue, 20 Mar 2012 23:46:03 +0100

Reuben Thomas wrote:
> The following patch copes with a renamed module:

It appears that it hasn't been renamed, but rather replaced,
at least in Debian.

  
http://wiki.debian.org/Teams/DebianPerlGroup/OpenTasks/Transitions/DigestSHA1ToDigestSHA

> From: Reuben Thomas <address@hidden>
> Date: Tue, 20 Mar 2012 20:17:22 +0000
> Subject: [PATCH] announce-gen: make it work with Perl 5.14.
...
>  use Getopt::Long;
>  use Digest::MD5;
> -use Digest::SHA1;
> +if (!$^V or $^V lt v5.14.0) {
> +  require Digest::SHA1;
> +  Digest::SHA1->import();
> +} else {
> +  use Digest::SHA;
> +  Digest::SHA->import();
> +}

How about this instead, since Digest::SHA is preferable, when it exists?
(no need for ->import, afaics)

  eval { require Digest::SHA }
    or eval { require Digest::SHA1 };

Besides, we must not "use Digest::SHA;" when the module does not exist.
Otherwise, something like this would happen, even when it is in an
inactive "else" clause:

    $ perl -e 'if (0) { use FOO::BAR }'
    Can't locate FOO/BAR.pm in @INC (@...

Please adjust your subject/log, too.
It has always worked fine with Fedora's 5.14.x



reply via email to

[Prev in Thread] Current Thread [Next in Thread]