This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

ActivePerl Term::ReadLine and 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


Cygnus Win95/NT Configuration Diagnostics
Current System Time: Thu Dec 21 20:56:08 2000

Win9X Ver 4.10 build 67766446  A 

Path:	/usr/local/bin
	/usr/bin
	/bin
	/usr/bin
	/c/PERL/BIN
	/c/WORK/RELEASE/BIN
	/c/DEVEL/PHP
	.
	/c/WORK/RELEASE/LIB
	/c/PROGRA~1/WIN98RK
	/USR/LOCAL/BIN
	/c/DEVEL/JAVA/JDK1.3/BIN/
	/c/WINDOWS
	/c/WINDOWS
	/c/WINDOWS/COMMAND
	/c/MSSQL7/BINN

SysDir: C:\WINDOWS\SYSTEM
WinDir: C:\WINDOWS

PWD = `/home/default'
CYGWIN = `binmode'
USER = `default'
MAKE_MODE = `unix'
HOME = `/home/default'

PROMPT = `$p$g'
PERL = `C:\Perl\bin'
COMSPEC = `C:\WINDOWS\COMMAND.COM'
WA_SRC = `/c/work/src'
PHP = `C:\devel\php'
!C: = `C:\devel\cygwin\bin'
CMDLINE = `bash --login -i'
HOSTNAME = `CENTRAL'
WA_WEBSITE = `/c/work/release/website'
PATHEXT = `.COM;.EXE;.BAT;.CMD;.PL'
WA_LIB = `/c/work/release/lib'
CLASSPATH = `.;C:\work\release\lib'
WINDIR = `C:\WINDOWS'
WINBOOTDIR = `C:\WINDOWS'
PS1 = `]0;\w
\u@\h \w
$ '
BLASTER = `A220 I5 D1 T4'
WA_CFG = `/c/work/src/cfg'
CYGLOCALBIN = `c:\devel\cygwin\usr\local\bin'
MACHTYPE = `i686-pc-cygwin'
WA_BIN = `/c/work/release/bin'
OLDPWD = `/usr/bin'
TEMP = `/c/windows/TEMP'
DOCS = `c:\mydocu~1\'
DESKTOP = `c:\windows\desktop'
SHLVL = `1'
WA = `C:\work'
CYGWINBIN = `C:\devel\cygwin\bin'
SHELL = `/bin/sh'
HOSTTYPE = `i686'
CVSROOT = `/c/work/cvs'
OSTYPE = `cygwin'
TERM = `cygwin'
JIKESPATH = `.:/c/work/release/lib:/c/devel/java/jdk1.3/jre/lib/rt.jar:/c/devel/java/jdk1.3/jre/lib/ext/xml.jar'
WA_REL = `/c/work/release'
_ = `/usr/bin/cygcheck'
TZ = `GMTST0GMTDT-1,M3.5.0/1,M10.5.0/2'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x00000020
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\desktop
  (default) = `c:\windows\desktop'
  flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/c
  (default) = `c:'
  flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `C:/devel/cygwin'
  flags = 0x00000008
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = `C:/devel/cygwin/bin'
  flags = 0x00000008
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = `C:/devel/cygwin/lib'
  flags = 0x00000008
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\01
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\02
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\03
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\04
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\05
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\06
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\07
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\08
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\09
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0A
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0B
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0C
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0D
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0E
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0F
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\10
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\11
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\12
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\13
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\14
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\15
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\16
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\17
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\18
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\19
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1A
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1B
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1C
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1D

a:  fd           N/A    N/A                    
c:  hd  FAT32   4085Mb  83% CP    UN           
d:  cd           N/A    N/A                    

C:\devel\cygwin\bin  /usr/bin  system  textmode
C:\devel\cygwin\lib  /usr/lib  system  textmode
C:\devel\cygwin  /        system  textmode
c:    /c       user    textmode

Found: C:\devel\cygwin\bin\bash.exe
Found: C:\devel\cygwin\bin\cat.exe
Found: C:\devel\cygwin\bin\cpp.exe
Found: C:\devel\cygwin\bin\find.exe
Found: c:\WINDOWS\COMMAND\find.exe
Warning: C:\devel\cygwin\bin\find.exe hides c:\WINDOWS\COMMAND\find.exe
Found: C:\devel\cygwin\bin\gcc.exe
Found: C:\devel\cygwin\bin\gdb.exe
Found: C:\devel\cygwin\bin\ld.exe
Found: C:\devel\cygwin\bin\ls.exe
Found: C:\devel\cygwin\bin\make.exe
Found: C:\devel\cygwin\bin\sh.exe

   18k 2000/10/23 C:\devel\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm.dll" v0.0 ts=2000/10/23 3:26
   45k 2000/10/22 C:\devel\cygwin\bin\cygjbig1.dll - os=4.0 img=1.0 sys=4.0
                  "cygjbig1.dll" v0.0 ts=2000/10/23 0:06
  119k 2000/10/23 C:\devel\cygwin\bin\cygjpeg6b.dll - os=4.0 img=1.0 sys=4.0
                  "cygjpeg6b.dll" v0.0 ts=2000/10/23 1:58
  162k 2000/10/23 C:\devel\cygwin\bin\cygpng2.dll - os=4.0 img=1.0 sys=4.0
                  "cygpng2.dll" v0.0 ts=2000/10/23 1:40
  243k 2000/10/23 C:\devel\cygwin\bin\cygtiff3.dll - os=4.0 img=1.0 sys=4.0
                  "cygtiff3.dll" v0.0 ts=2000/10/23 2:14
   49k 2000/10/23 C:\devel\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
                  "cygz.dll" v0.0 ts=2000/10/23 1:22
   81k 2000/11/26 C:\devel\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitcl30.dll" v0.0 ts=2000/11/26 1:43
   35k 2000/11/26 C:\devel\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitk30.dll" v0.0 ts=2000/11/26 1:43
  390k 2000/11/26 C:\devel\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtcl80.dll" v0.0 ts=2000/11/26 1:39
    5k 2000/11/26 C:\devel\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
   10k 2000/11/26 C:\devel\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtclreg80.dll" v0.0 ts=2000/11/26 1:39
  623k 2000/11/26 C:\devel\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtk80.dll" v0.0 ts=2000/11/26 1:43
   45k 2000/12/07 C:\devel\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
                  "cygform5.dll" v0.0 ts=2000/12/7 6:41
   26k 2000/12/07 C:\devel\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu5.dll" v0.0 ts=2000/12/7 6:40
  159k 2000/12/07 C:\devel\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++5.dll" v0.0 ts=2000/12/7 6:42
  225k 2000/12/07 C:\devel\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses5.dll" v0.0 ts=2000/12/7 6:39
   14k 2000/10/23 C:\devel\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl.dll" v0.0 ts=2000/10/23 20:02
   15k 2000/12/07 C:\devel\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel5.dll" v0.0 ts=2000/12/7 6:40
   17k 2000/11/30 C:\devel\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory4.dll" v0.0 ts=2000/11/30 2:28
  475k 2000/11/20 C:\devel\cygwin\bin\cygbz21.0.dll - os=4.0 img=1.0 sys=4.0
                  "cygbz21.0.dll" v0.0 ts=2000/11/20 23:53
  108k 2000/11/30 C:\devel\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline4.dll" v0.0 ts=2000/11/30 2:28
  609k 2000/11/22 C:\devel\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2000/11/22 2:00
    Cygwin DLL version info:
        dll major: 1001
        dll minor: 6
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 30
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        cygdrive flags: cygdrive flags
        cygdrive prefix: cygdrive prefix
        cygdrive default prefix: 
        build date: Tue Nov 21 21:00:16 EST 2000
        shared id: cygwin1S3

Use -h to see help about each section
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]