Skip Menu |

This queue is for tickets about the IO-Prompter CPAN distribution.

Report information
The Basics
Id: 64323
Status: open
Priority: 0/
Queue: IO-Prompter

People
Owner: Nobody in particular
Requestors: cpan [...] prather.org
Cc:
AdminCc:

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



Subject: Only one charecter menu items are chosen
I have a menu prompt with 50 some items in it. I noticed that picking Item 43, for example, would take me to item 4. Rooting around a little it turns out the problem is with line 118. Where you have: $tag =~ s{\A\s*(\S?).*}{$1}xms; changed to: $tag =~ s{\A\s*(\S*).*}{$1}xms; fixed the problem. If you can point me to the proper source repository I can create an actual patch, or I can create one against the gitpan sources. -Chris
I have in fact attached a real patch here.
Subject: rt-64324.patch
commit 1aa6e94150c8f6e6a93fc1db89f71abbb25d8aac Author: Chris Prather <chris@prather.org> Date: Thu Dec 30 02:23:53 2010 -0500 fix bug in menu from RT #64324 diff --git a/lib/IO/Prompter.pm b/lib/IO/Prompter.pm index f4fd9d0..48c9d01 100644 --- a/lib/IO/Prompter.pm +++ b/lib/IO/Prompter.pm @@ -115,7 +115,7 @@ sub prompt { # Handle a failure by exiting the loop... last MENU if !defined $tag; - $tag =~ s{\A\s*(\S?).*}{$1}xms; + $tag =~ s{\A\s*(\S*).*}{$1}xms; # Handle <ESC> by moving up menu stack... if ($tag eq $MENU_ESC) {