X-From-Line: hv@zen.crypt.org Sun Nov 4 17:01:45 2007 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on k75.linux.bogus X-Spam-Level: X-Spam-Status: No, score=-1.0 required=6.1 tests=AWL,BAYES_50 autolearn=no version=3.2.1 X-Spam-Report: * 0.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% * [score: 0.5000] * -1.0 AWL AWL: From: address is in the auto white-list Received: from zen.crypt.org (upuaut.novacaster.com [217.146.123.119]) by franz.ak.mind.de (8.13.8/8.14.1/Debian-8) with ESMTP id lA4G1bdF000816 for ; Sun, 4 Nov 2007 17:01:45 +0100 Received: from zen.crypt.org (localhost.localdomain [127.0.0.1]) by zen.crypt.org (8.14.1/8.14.1) with ESMTP id lA4FCPtw027987; Sun, 4 Nov 2007 15:12:26 GMT X-Gnus-Mail-Source: directory:~/Mail/spool/ Gnus-Warning: This is a duplicate of message <200711041512.lA4FCPtw027987@zen.crypt.org> Message-Id: <200711041512.lA4FCPtw027987@zen.crypt.org> To: andreas.koenig.7os6VVqR@franz.ak.mind.de (Andreas J. Koenig) cc: The Perl5 Porters Mailing List , hv@crypt.org, rootbeer@redcat.com Subject: Term-ReadPassword (was Re: BBC(Bleadperl Breaks CPAN) Where are we now?) From: hv@crypt.org In-Reply-To: <87sl3mb1mr.fsf@k75.linux.bogus> Date: Sun, 04 Nov 2007 15:12:25 +0000 Sender: hv@zen.crypt.org X-Saved-For-King: Sun, 4 Nov 2007 17:02:06 +0100 X-Filter: mailagent [version 3.0 PL73] for andreas.koenig@anima.de Lines: 82 Xref: k75.linux.bogus perl5-porters:134043 andreas.koenig.7os6VVqR@franz.ak.mind.de (Andreas J. Koenig) wrote: :After 45 BBC articles and 5.10 waiting around the corner I wanted to :get an overview about the open issues. So I made the table below, [...] : Unsolved (20): : -------------- : PHOENIX/Term-ReadPassword-0.07.tar.gz http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2007-08/msg00183.html Applying the change suggested by Steffen shows a further problem: NCCS must be removed from the CC_FIELDS list. (NCCS is the first invalid index for POSIX::Termios::getcc().) The nature of the original problem is that as written, CC_FIELDS is populated only with VEOF, so the other fields in the code never got saved and restored. I suggest the patch below which adds the commas and removes NCCS, and also adds a test to verify that there is more than one entry in CC_FIELDS. Hugo --- ReadPassword.pm.old 2005-10-25 19:56:02.000000000 +0100 +++ ReadPassword.pm 2007-11-04 15:03:54.000000000 +0000 @@ -4,8 +4,8 @@ use Term::ReadLine; use POSIX qw(:termios_h); use constant CC_FIELDS => - (VEOF VEOL VERASE VINTR VKILL VQUIT - VSUSP VSTART VSTOP VMIN VTIME NCCS); + (VEOF, VEOL, VERASE, VINTR, VKILL, VQUIT, + VSUSP, VSTART, VSTOP, VMIN, VTIME); use vars qw( $VERSION @ISA @EXPORT @EXPORT_OK @@ -19,7 +19,7 @@ @EXPORT = qw( read_password ); -$VERSION = '0.07'; +$VERSION = '0.08'; # The special characters in the input stream %SPECIAL = ( --- Changes.old 2005-08-28 21:08:59.000000000 +0100 +++ Changes 2007-11-04 15:03:38.000000000 +0000 @@ -21,3 +21,6 @@ 0.06 Sun Aug 28 13:07:00 2005 - Setting $Term::ReadPassword::USE_STARS to a true value now echoes stars for password characters. + +0.07 Sun Nov 04 15:46:00 2007 + - CC_FIELDS list was broken (Hugo van der Sanden ) --- META.yml.old 2005-10-25 19:56:10.000000000 +0100 +++ META.yml 2007-11-04 15:03:48.000000000 +0000 @@ -1,7 +1,7 @@ # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: Term-ReadPassword -version: 0.07 +version: 0.08 version_from: ReadPassword.pm installdirs: site requires: --- t/1_basics.t.old 2005-03-31 21:27:40.000000000 +0100 +++ t/1_basics.t 2007-11-04 15:04:10.000000000 +0000 @@ -1,7 +1,15 @@ #!perl -BEGIN { $| = 1; print "1..1\n"; } +BEGIN { $| = 1; print "1..2\n"; } END {print "not ok 1\n" unless $loaded;} use Term::ReadPassword; $loaded = 1; print "ok 1\n"; +{ + my @list = Term::ReadPassword::CC_FIELDS; + if (@list > 1) { + print "ok 2\n"; + } else { + print "not ok 2\n" + } +}