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: 128806
Status: patched
Priority: 0/
Queue: Term-ReadLine-Gnu

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

Bug Information
Severity: (no value)
Broken in: 1.36
Fixed in: (no value)



Subject: Test suite fails if TERM environment variable is unset
Download (untitled) / with headers
text/plain 1.2k
See subject. This can be easily reproduced: ... (unset TERM; perl5.26.2 -Mblib t/00checkver.t) 1..4 ok 1 - load done Use of uninitialized value $Term::ReadLine::Gnu::VERSION in concatenation (.) or string at t/00checkver.t line 29. # I'm testing Term::ReadLine::Gnu version not ok 2 - An object of class 'Term::ReadLine::Stub' isa 'Term::ReadLine' # Failed test 'An object of class 'Term::ReadLine::Stub' isa 'Term::ReadLine'' # at t/00checkver.t line 32. # The object of class 'Term::ReadLine::Stub' isn't a 'Term::ReadLine' not ok 3 - 'Attribs' isa 'Term::ReadLine' # Failed test ''Attribs' isa 'Term::ReadLine'' # at t/00checkver.t line 34. # 'Attribs' isn't a 'Term::ReadLine' # OS: linux # Perl version: 5.026002 Use of uninitialized value in concatenation (.) or string at t/00checkver.t line 38. Use of uninitialized value in printf at t/00checkver.t line 38. # GNU Readline Library version: , 0x0 Use of uninitialized value $ENV{"TERM"} in concatenation (.) or string at t/00checkver.t line 39. # $TERM= ok 4 - library_version and readline_version # Looks like you failed 2 tests of 4. (More test scripts also fail like this) Some of my smokers are operating as a cronjob. Typically cronjobs have no tty and also no TERM environment variable set.
Download (untitled) / with headers
text/plain 1.1k
Thank you for your report. If $TERM is not set properly, the GNU Readline Library does not work. So Term::ReadLine::Gnu let Term::ReadLine choose Term::ReadLine::Stub instead of Term::ReadLine::Gnu. This feature was implemented in Term::ReadLine::Gnu-1.36. See https://rt.cpan.org/Ticket/Display.html?id=123398 for more details. Show quoted text
> Some of my smokers are operating as a cronjob. Typically cronjobs have no tty and also no TERM environment variable set.
On this environment the GNU Readline Library does not work. 'make test' does not make any sense. I will add the following fix on the next release. --- Makefile.PL (revision 563) +++ Makefile.PL (working copy) @@ -32,6 +32,12 @@ warn "cannot open /dev/tty\n"; exit 0; } +# test $TERM for CPAN Testers +if ($ENV{AUTOMATED_TESTING} + && (!exists($ENV{TERM}) || !defined($ENV{TERM}) || $ENV{TERM} =~ /^(dumb|emacs|unknown|)$/)) { + warn "wrong \$TERM value: $ENV{TERM}\n"; + exit 0; +} # I could not reach a tester, "Chris Williams (BINGOS)". #if ($ENV{AUTOMATED_TESTING} && ($Config{osname} eq 'openbsd')) { # die "OS unsupported\nPlease contact the author.\n";


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.