Subject: | IO::Prompter doesn't validate out of range value on Ubuntu 11.10 |
Date: | Sun, 27 Jan 2013 02:32:59 +0800 (SGT) |
To: | bug-IO-Prompter [...] rt.cpan.org |
From: | Kalyan Raj <kalyanraj55 [...] yahoo.co.in> |
Hi Damian,
I found an issue when I am trying to select an option from the numbered or alphabetic menu. When i select out of range value, code is skipped for the next line, without doing any validation. This occurred on Ubuntu 11.10.
here are the details
perl -v
This is perl 5, version 12, subversion 4 (v5.12.4) built for i686-linux-gnu-thread-multi-64int
(with 48 registered patches, see perl -V for more detail)
Copyright 1987-2010, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
Distribution name and version
IO-Prompter-0.004003
Operating system vendor and version
Linux tanmayee-desktop 3.0.0-30-generic #47-Ubuntu SMP Wed Jan 2 22:39:01 UTC 2013 i686 i686 i386 GNU/Linux.
Code:
#!/usr/bin/perl
use IO::Prompter;
my $selection
= prompt 'Choose wisely...', -menu => {
wealth => [ 'moderate', 'vast', 'incalculable' ],
health => [ 'hale', 'hearty', 'rude' ],
wisdom => [ 'cosmic', 'folk' ],
}, '>';
Please let me know if this is really a bug in Ubuntu or Perl module.
Regards,
Kalyan Raj