public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* ActivePerl Term::ReadLine and cygwin
@ 2000-12-21 13:00 Sagar R. Shah
  0 siblings, 0 replies; only message in thread
From: Sagar R. Shah @ 2000-12-21 13:00 UTC (permalink / raw)
  To: cygwin

Hi All

I'm getting some unexpected behaviour with a perl program that is designed
to ask the user for parameters here's the example perl code:

-----
use Term::ReadLine;

my($ftp, $cfg, $term);
my(@filelist, @binary_extensions, @config_options, @files);
my(%clo, %options, %commands);

$term = new Term::ReadLine 'terminal';
@config_options = ('host', 'user', 'pwd', 'ldir', 'rdir');

foreach my $opt (@config_options) {
    $options{$opt} = $term->readline("Enter " . $opt . ": ");
}
------

so this should ask the super for 5 values, one at a time.

However when I run it from bash (with CYGWIN=binmode), what occurs is that
bash skips past the first prompt (entering nothing for it) and goes to the
second prompt:

----
$ perl abc.pl
Enter host:
Enter user:
----

Subsequent presses of the enter key proceed as normal (one propt at a time).

I'm using windows ActivePerl rather than the cygwin port, but this shouldn't
really be a problem in this case (i think). I'm using the latest version of
CYGWIN.

I tried setting CYGWIN=tty, in this case it does stop at the first prompt,
but hangs when I enter my value and press enter.

It seems to me as if I've got bash/cygwin configured incorrectly. 
Does anyone have any ideas?    [cygcheck -v -s -r attached]
Or has anyone else got similar code to run with cygwin and activerperl?
Does it work fine with cygwin and the cygwin-perl port?

Thanks

Sagar

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-12-21 13:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-21 13:00 ActivePerl Term::ReadLine and cygwin Sagar R. Shah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).