quilt-dev
[Top][All Lists]
Advanced

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

Re: [Quilt-dev] Term::ReadKey in test/run


From: John Vandenberg
Subject: Re: [Quilt-dev] Term::ReadKey in test/run
Date: Tue, 6 Sep 2005 19:54:29 +1000

On 9/6/05, Jean Delvare <address@hidden> wrote:
> 
> Hi John,
> 
> [John Vandenberg]
> > Could the following patch be applied to allow test/run to work without
> > Term::ReadKey?  It isnt installed by default on several unix/linux
> > favours I have run into, and I haven't found a way to compile it into
> > MSYS perl.
> 
> I didn't realize that Term::ReadKey was solely used to get the number of
> columns the terminal has. Sounds a bit overkill to me, especially since
> this module isn't part of the standard distribution.
> 
> > Index: quilt/test/run
> > ===================================================================
> > --- quilt.orig/test/run
> > +++ quilt/test/run
> > @@ -13,11 +13,25 @@ use strict;
> >  use FileHandle;
> >  use Getopt::Std;
> >  use POSIX qw(isatty setuid);
> > -use Term::ReadKey;
> >  use vars qw($opt_l $opt_v);
> >
> > +BEGIN {
> > +  my $mod = 'Term::ReadKey';
> > +  if (eval "require $mod") {
> > +    $mod->import();
> > +  }
> > +  else {
> > +    eval 'sub GetTerminalSize() {
> > +      my @rv;
> > +      push @rv, $ENV{COLUMNS} || 80;
> > +      return @rv;
> > +    }';
> 
> Can be simplified to:
> eval 'sub GetTerminalSize() {
>       return ($ENV{COLUMNS} || 80);
> }';
> 
> > +  }
> > +}
> > +
> >   no warnings qw(taint);
> 
> Anyway, I would go with ($ENV{COLUMNS} || 80) for everyone without even
> trying Term::ReadKey. This should be sufficient, it's only a test suite
> after all.
> 
> Oh, and thanks for the trick, now I can use the test suite here :)

Sounds like you are running into a lot of problems I've already
addressed; albeit without your elegance :)

You may want to pore through this series of patches.

http://zeroj.hda0.net/quilt-patches/series-all

I tried to use "quilt mail" to submit this smaller series on Saturday
night, but it appears to have never made it.  I tested sending it to
another email address, which worked.  I was waiting for bounces before
investigating further.

http://zeroj.hda0.net/quilt-patches/series

Specifically for RH 6, these may be causing you grief ...

config-nls.diff
config-misc.diff
test-example1.diff

Also, see the first item in my TODO:

- move.test in pop-overwrite-deleted.diff exhibits erratic behaviour in pop 
  Affects: MSYS(GnuWin32), SuSE 7.2

  Often the overwrite operation will proceed without error (Serious dataloss)

  Fedora Core 3 2.6.10-1.766 always halts pop attempting to overwrite.

--
John




reply via email to

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