quilt-dev
[Top][All Lists]
Advanced

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

Re: [Quilt-dev] [PATCH] Fix ugly test-breaking spam with Perl 5.16+ and


From: Martin Quinson
Subject: Re: [Quilt-dev] [PATCH] Fix ugly test-breaking spam with Perl 5.16+ and Locale::gettext
Date: Mon, 1 Apr 2013 13:28:25 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Mar 31, 2013 at 07:56:56PM +0100, Nix wrote:
> Perl 5.16+ has started to complain if you import all symbols from both
> POSIX and Locale::gettext, which quilt does in a couple of places. 

Many thanks for the feedback. I wasn't aware of it.

> Index: quilt/quilt/scripts/edmail.in
> ===================================================================
> --- quilt.orig/quilt/scripts/edmail.in        2013-03-31 19:37:11.190159678 
> +0100
> +++ quilt/quilt/scripts/edmail.in     2013-03-31 19:37:13.129997757 +0100
> @@ -7,6 +7,7 @@
>  #            Message Header Extensions for Non-ASCII Text
>  
>  use Getopt::Long;
> +use POSIX qw(setlocale);
>  use strict;
>  
>  # This ugly trick lets the script work even if gettext support is missing.
> @@ -15,8 +16,6 @@
>  BEGIN {
>      if (eval { require Locale::gettext }) {
>       import Locale::gettext;
> -     require POSIX;
> -     import POSIX, qw(setlocale);
>      } else {
>       eval '
>           use constant LC_MESSAGES => 0;

My concern with your patch is that it makes quilt depending on POSIX
in every case. How will it work on windows minsys or mingw, for
example?

The initial intend of the code was to use the locales if available,
and keep working (using english messages) if not.

Is it possible to do something like "use POSIX qw(setlocale) || true;"
(or similar) so that it works when this package is not available?

Thanks for raising the issue and the initial patch anyway,
Mt

-- 
Si vous pensez que la technologie peut résoudre vos problèmes de
sécurité alors vous n'avez rien compris aux problèmes ni à la
technologie.  -- Bruce Schneier



reply via email to

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