Skip Menu |

This queue is for tickets about the Term-ReadLine-Gnu CPAN distribution.

Maintainer(s)' notes

When you report a bug, please provide the following information;

- output of
	perl -V
	perl Makefile.PL verbose
	make test TEST_VERBOSE=1
	perl -Mblib t/00checkver.t
	echo $TERM
- terminal emulator which you are using
- compiler which is used to compile the GNU Readline Library (libreadline.a) if you can know.
Read INSTALL in the distribution for more details.

Report information
The Basics
Id: 94216
Status: resolved
Priority: 0/
Queue: Term-ReadLine-Gnu

People
Owner: HAYASHI [...] cpan.org
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.24
Fixed in: 1.25



Subject: t/readline.t leaves terminal backspace in broken state
For some reason, t/readline.t changes the terminal's backspace code from my default of ^? to ^H

Annoyingly, simply calling `reset` is not enough either, I have to call `reset -e ^?` to get a working backspace key.


Subject: perl-V.txt
Summary of my perl5 (revision 5 version 19 subversion 10) configuration: Platform: osname=linux, osvers=3.13.5-gentoo, archname=x86_64-linux uname='linux katipo2 3.13.5-gentoo #59 smp wed mar 19 16:06:17 nzdt 2014 x86_64 intel(r) core(tm) i5-2410m cpu @ 2.30ghz genuineintel gnulinux ' config_args='-de -Dprefix=/home/kent/perl5/perlbrew/perls/perl-5.19.10 -Doptimize=-march=native -mtune=native -O3 -pipe -msse -msse2 -mssse3 -msse4.1 -msse4.2 -mavx -mfxsr -mxsave -mxsaveopt -Dusedevel -Aeval:scriptdir=/home/kent/perl5/perlbrew/perls/perl-5.19.10/bin' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-march=native -mtune=native -O3 -pipe -msse -msse2 -mssse3 -msse4.1 -msse4.2 -mavx -mfxsr -mxsave -mxsaveopt', cppflags='-fno-strict-aliasing -pipe -fstack-protector' ccversion='', gccversion='4.8.2', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags =' -fstack-protector' libpth=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include-fixed /usr/lib /lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64 libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.17.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.17' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -march=native -mtune=native -O3 -pipe -msse -msse2 -mssse3 -msse4.1 -msse4.2 -mavx -mfxsr -mxsave -mxsaveopt -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF Built under linux Compiled at Mar 21 2014 15:15:27 %ENV: PERLBREW_BASHRC_VERSION="0.67" PERLBREW_HOME="/home/kent/.perlbrew" PERLBREW_MANPATH="/home/kent/perl5/perlbrew/perls/perl-5.19.10/man" PERLBREW_PATH="/home/kent/perl5/perlbrew/bin:/home/kent/perl5/perlbrew/perls/perl-5.19.10/bin" PERLBREW_PERL="perl-5.19.10" PERLBREW_ROOT="/home/kent/perl5/perlbrew" PERLBREW_VERSION="0.67" PERL_CPANM_OPT=" --prompt --reinstall --interactive --with-recommends --with-suggests --with-develop --verify" @INC: /home/kent/perl5/perlbrew/perls/perl-5.19.10/lib/site_perl/5.19.10/x86_64-linux /home/kent/perl5/perlbrew/perls/perl-5.19.10/lib/site_perl/5.19.10 /home/kent/perl5/perlbrew/perls/perl-5.19.10/lib/5.19.10/x86_64-linux /home/kent/perl5/perlbrew/perls/perl-5.19.10/lib/5.19.10 .
Bah. Hit create instead of add more files.

Term is `urxvt` known as rxvt-unicode-256color

Subject: Makefile_PL_verbose.txt
Found `/usr/lib/libncurses.so'. cc -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_STRING_H rlver.c -o rlver -fstack-protector -lreadline -lncurses It seems that you have the GNU Readline Library version 6.3. cc -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_STRING_H -DTRG_READLINE_VERSION=0x0603 rlmalloc.c -o rlmalloc -fstack-protector -lreadline -lncurses /tmp/ccJtx7oI.o: In function `main': rlmalloc.c:(.text+0xe): undefined reference to `xmalloc' rlmalloc.c:(.text+0x2a): undefined reference to `xrealloc' rlmalloc.c:(.text+0x5c): undefined reference to `xfree' collect2: error: ld returned 1 exit status /tmp/ccSofUwP.o: In function `main': rlmalloc.c:(.text+0xe): undefined reference to `xmalloc' rlmalloc.c:(.text+0x2a): undefined reference to `xrealloc' rlmalloc.c:(.text+0x5c): undefined reference to `xfree' collect2: error: ld returned 1 exit status cc -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_STRING_H -DTRG_READLINE_VERSION=0x0603 -Dxfree=_rl_free -Dxmalloc=_rl_malloc -Dxrealloc=_rl_realloc rlmalloc.c -o rlmalloc -fstack-protector -lreadline -lncurses ABSTRACT_FROM => q[Gnu.pm] AUTHOR => [q[Hiroo HAYASHI <hiroo.hayashi@computer.org>]] BUILD_REQUIRES => { } CONFIGURE_REQUIRES => { } DEFINE => q[-DHAVE_STRING_H -DTRG_READLINE_VERSION=0x0603 -Dxfree=_rl_free -Dxmalloc=_rl_malloc -Dxrealloc=_rl_realloc] EXE_FILES => [q[eg/perlsh]] INC => q[] LDDLFLAGS => q[ -shared -march=native -mtune=native -O3 -pipe -msse -msse2 -mssse3 -msse4.1 -msse4.2 -mavx -mfxsr -mxsave -mxsaveopt -fstack-protector] LIBS => [q[ -lreadline -lncurses]] LICENSE => q[perl] META_MERGE => { resources=>{ repository=>q[https://sourceforge.net/p/perl-trg/code/HEAD/tree/], homepage=>q[http://sourceforge.net/projects/perl-trg/], license=>q[http://dev.perl.org/licenses/], bugtracker=>q[http://rt.cpan.org/Public/Dist/Display.html?Name=Term-ReadLine-Gnu] } } MIN_PERL_VERSION => q[5.008000] NAME => q[Term::ReadLine::Gnu] PREREQ_PM => { } TEST_REQUIRES => { } VERSION_FROM => q[Gnu.pm] clean => { FILES=>q[rlver.c rlver rlmalloc.c rlmalloc] } dist => { SUFFIX=>q[gz], COMPRESS=>q[gzip -9f] } dynamic_lib => { OTHERLDFLAGS=>q[] } Using PERL=/home/kent/perl5/perlbrew/perls/perl-5.19.10/bin/perl5.19.10 Potential libraries are '-lreadline -lncurses': readline not found in /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include-fixed '-lreadline' found at /usr/lib/libreadline.so ncurses not found in /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include-fixed '-lncurses' found at /usr/lib/libncurses.so Generating a Unix-style Makefile Writing Makefile for Term::ReadLine::Gnu Writing MYMETA.yml and MYMETA.json
Sorry. RT doesn't like me today.
Subject: testverbose.txt
Skip blib/lib/Term/ReadLine/Gnu/XS.pm (unchanged) Skip blib/lib/Term/ReadLine/Gnu.pm (unchanged) Running Mkbootstrap for Term::ReadLine::Gnu () chmod 644 Gnu.bs cc -c -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=native -mtune=native -O3 -pipe -msse -msse2 -mssse3 -msse4.1 -msse4.2 -mavx -mfxsr -mxsave -mxsaveopt -DVERSION=\"1.24\" -DXS_VERSION=\"1.24\" -fPIC "-I/home/kent/perl5/perlbrew/perls/perl-5.19.10/lib/5.19.10/x86_64-linux/CORE" -DHAVE_STRING_H -DTRG_READLINE_VERSION=0x0603 -Dxfree=_rl_free -Dxmalloc=_rl_malloc -Dxrealloc=_rl_realloc Gnu.c rm -f blib/arch/auto/Term/ReadLine/Gnu/Gnu.so LD_RUN_PATH="/usr/lib" cc -shared -march=native -mtune=native -O3 -pipe -msse -msse2 -mssse3 -msse4.1 -msse4.2 -mavx -mfxsr -mxsave -mxsaveopt -fstack-protector Gnu.o -o blib/arch/auto/Term/ReadLine/Gnu/Gnu.so \ -lreadline -lncurses \ chmod 755 blib/arch/auto/Term/ReadLine/Gnu/Gnu.so /home/kent/perl5/perlbrew/perls/perl-5.19.10/bin/perl5.19.10 -MExtUtils::Command::MM -e 'cp_nonempty' -- Gnu.bs blib/arch/auto/Term/ReadLine/Gnu/Gnu.bs 644 cp eg/perlsh blib/script/perlsh /home/kent/perl5/perlbrew/perls/perl-5.19.10/bin/perl5.19.10 -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/perlsh PERL_DL_NONLAZY=1 /home/kent/perl5/perlbrew/perls/perl-5.19.10/bin/perl5.19.10 "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(1, 'blib/lib', 'blib/arch')" t/*.t t/00checkver.t .. 1..4 # Running under perl version 5.019010 for linux # Current time local: Thu Mar 27 04:55:26 2014 # Current time GMT: Wed Mar 26 15:55:26 2014 # Using Test.pm version 1.26 # I'm testing Term::ReadLine::Gnu version 1.24 ok 1 ok 2 ok 3 # OS: linux # Perl version: 5.019010 # GNU Readline Library version: 6.3, 0x603 # $TERM=rxvt-unicode-256color ok 4 ok t/callback.t .... 1..7 ok 1 loading ok 2 ok 3 ok 4 # skipped since Tk is not available. ok 5 # skipped since Tk is not available. ok 6 # skipped since Tk is not available. ok 7 # skipped since Tk is not available. ok t/history.t ..... 1..84 ok 1 ok 2 ok 3 ok 4 ok 5 ok 6 ok 7 ok 8 ok 9 ok 10 ok 11 ok 12 ok 13 ok 14 ok 15 ok 16 ok 17 ok 18 ok 19 ok 20 ok 21 ok 22 ok 23 ok 24 ok 25 ok 26 ok 27 ok 28 ok 29 ok 30 ok 31 ok 32 ok 33 ok 34 ok 35 ok 36 ok 37 ok 38 ok 39 ok 40 ok 41 ok 42 ok 43 ok 44 ok 45 ok 46 ok 47 ok 48 ok 49 ok 50 ok 51 ok 52 ok 53 ok 54 ok 55 ok 56 ok 57 ok 58 ok 59 ok 60 ok 61 ok 62 ok 63 ok 64 ok 65 ok 66 ok 67 ok 68 ok 69 ok 70 ok 71 ok 72 ok 73 get_history_event ok 74 ok 75 ok 76 ok 77 ok 78 ok 79 ok 80 ok 81 ok 82 ok 83 ok 84 ok ok Try `/home/kent/perl5/perlbrew/perls/perl-5.19.10/bin/perl5.19.10 -Mblib t/readline.t verbose', if you will. t/readline.t .... 1..140 ok 1 loading ok 2 new ok 3 ReadLine method ok 4 Features method ok 5 Attrib method ok 6 readline_version ok 7 rl_version ok 8 ok 9 ok 10 ok 11 ok 12 ok 13 num_chars_to_read ok 14 pending_input ok 15 dispatching ok 16 ok 17 ok 18 display_prompt ok 19 already_prompted ok 20 gnu_readline_p ok 21 ok 22 readline_name ok 23 prefer_envwin_size ok 24 ok 25 startup_hook ok 26 ok 27 ok 28 ok 29 ok 30 ok 31 ok 32 ok 33 ok 34 executing_keymap ok 35 binding_keymap ok 36 executing_macro ok 37 executing_key ok 38 executing_keyseq ok 39 key_sequence_length ok 40 readline_state ok 41 explicit_arg ok 42 numeric_arg ok 43 editing_mode ok 44 add_defun ok 45 ok 46 ok 47 ok 48 bind_key ok 49 ok 50 ok 51 ok 52 keymap binding ok 53 macro binding ok 54 function binding ok 55 rl_read_init_file ok 56 ok 57 ok 58 unbind_key ok 59 add_funmap_entry ok 60 invoking_keyseqs ok 61 catch_signals ok 62 catch_sigwinch ok 63 change_environment ok 64 set/get_screen_size ok 65 ok 66 ok 67 ok 68 ok 69 char_is_quoted_p ok 70 ok 71 ok 72 ok 73 ok 74 ok 75 ok 76 ok 77 ok 78 ok 79 ok 80 ok 81 ok 82 special_prefixes ok 83 ok 84 ok 85 ok 86 ok 87 ok 88 ok 89 ok 90 ok 91 ok 92 ok 93 ok 94 ok 95 completion_type ok 96 ok 97 ok 98 accept-line is bound to \C-m ok 99 forward-char is bound to \C-f ok 100 backward-char is bound to \C-b ok 101 forward-word is bound to \M-f ok 102 backward-word is bound to \M-b ok 103 end-of-line is bound to \C-e ok 104 beginning-of-line is bound to \C-a ok 105 backward-delete-char is bound to \C-h ok 106 delete-char is bound to \C-d ok 107 complete is bound to \C-i ok 108 self insert ok 109 cursor move ok 110 custom commands ok 111 undo ok 112 macro ok 113 ornaments ok 114 operate_and_get_next 1 ok 115 operate_and_get_next 2 ok 116 operate_and_get_next 3 ok 117 operate_and_get_next 4 ok 118 history 1 ok 119 history 2 ok 120 history 3 ok 121 insert completion ok 122 default completion ok 123 username completion ok 124 list completion ok 125 filename completion ok 126 null completion 1 ok 127 null completion 2 ok 128 list & file completion ok 129 ingore_some_completion ok 130 filename_quoting_function ok 131 filename_dequoting_function ok 132 directory_completion_hook ok 133 filename_list ok 134 startup_hook ok 135 pre_input_hook ok 136 redisplay_function ok 137 ok 138 ok 139 ok 140 ok All tests successful. Files=4, Tests=235, 1 wallclock secs ( 0.05 usr 0.01 sys + 0.20 cusr 0.05 csys = 0.31 CPU) Result: PASS
If it helps, I captured the value of `stty --save` before and after running the test


diff -Naur --label before --label after <( tr ":" "\n" < /tmp/before ) <( tr ":" "\n" < /tmp/after  )
--- before
+++ after
@@ -4,7 +4,7 @@
 8a3b
 3
 1c
-7f
+8
 15
 4
 0

Hi, Thank you for your report. On Wed, 26 Mar 2014 15:54:02 GMT, KENTNL wrote: Show quoted text
> For some reason, t/readline.t changes the terminal's backspace code from my default of ^? to ^H
Yes, it does. $ grep -n -B2 stty t/readline.t 59-# These tty setting affects GNU Readline key-bindings. 60-# Set the standard bindings before rl_initialize() being called. 61:system('stty erase ^h') == 0 or warn "stty erase failed: $?"; 62:system('stty kill ^u') == 0 or warn "stty kill failed: $?"; 63:system('stty lnext ^v') == 0 or warn "stty lnext failed: $?"; 64:system('stty werase ^w') == 0 or warn "stty werase failed: $?"; $ I realized that we don't need these lines, since check_default_keybind_and_fix() in t/readline.t takes care of differences of key-bindings. I've committed the fix. It will be included in the next release. Probably it will be after GNU Readline 6.4 will be released.
The fix is in Term-ReadLine-Gnu-1.25.