develooper Front page | perl.perl5.porters | Postings from August 2009

Term::ReadLine::Perl in Bundle::CPAN

Thread Next
From:
Zefram
Date:
August 25, 2009 01:40
Subject:
Term::ReadLine::Perl in Bundle::CPAN
Message ID:
20090825084025.GF19290@fysh.org
Term::ReadLine::Perl is pissing me off.  It has an obnoxious install
process, wherein "make test" starts up a program that uses the readline
facility and demands input from the tty.  If you've got Term::ReadKey
installed, it even throws away typeahead.  If you're installing it (as a
dependency of something else) on many perls consecutively, or from cron,
the installations grinds to a halt at that point.

This obnoxious behaviour is a problem because T:RL:P is part of
Bundle::CPAN.  It gets installed (or at least gets an attempt to install
it) pretty often.  By proxy, Bundle::CPAN has obnoxious installation
behaviour.  We need to fix this.  I see three main possibilities for
doing this:

    (0) Get T:RL:P itself fixed.

    (1) Put a workaround into CPAN.pm.

    (2) Drop T:RL:P from Bundle::CPAN.

I have so far tried approach 0, and it's not looking good.  I submitted
a minimal patch, via RT, but the author refuses to believe that anyone
does "big installs" via automated tools such as CPAN.pm.  Maybe someone
more diplomatic than I am can talk him round, but I suspect not.

Approach 1 would be pretty easy, though of course Wrong.  T:RL:P will skip
the interactive test if it sees a true value in $ENV{AUTOMATED_TESTING}.
CPAN.pm could locally put that in the environment, specifically for
"make test" on T:RL:P.

Approach 2 would preferably involve having some alternative full-editing
T:RL:* to include in the bundle.  T:RL:Gnu is problematic because
it relies on a C library.  There is a T:RL:Zoid, which on a cursory
look seems very satisfactory, and it even manages to test most of
the interactive behaviour without making the test suite interactive.
Using this automatically in CPAN.pm would require either CPAN.pm to detect
it and set up $ENV{PERL_RL}, or a dual-lifed version of Term::ReadLine
that includes T:RL:Zoid among the defaults to look for.

Preferences?

-zefram

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About