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

Report information
The Basics
Id:
18473
Status:
open
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
Smylers [...] stripey.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: Unwarranted Presumption About $\
Date: Fri, 31 Mar 2006 14:12:41 +0100
To: bug-io-prompt@rt.cpan.org
From: Smylers <Smylers@stripey.com>
Hi there. Thanks for IO::Prompt -- it looks like a really useful module. I've spotted a bug which while small did trip me up the very first time I tried out this module after installing it: % perl -MIO::Prompt -wle '$t = prompt "What? "; print "[$t]"' The text entered by the user is rather confusingly displayed only one character per line, so it goes down the screen rather than across. The culprit is the -l option, which is setting $\ to "\n" -- which is exactly what I wanted in the print statement in the line above, but which is also affecting print inside the prompt function. The fix is simple; just add this line: local $\ = ''; I put it just before the print statement on line 446 (in version 0.99.4): print {$OUT}(defined $echo ? $echo : $next); But it may be that there are other print statements in IO::Prompt affected by this, and $\ should actually be set in a wider scope. Best wishes, and thank you again for the module. Smylers
Subject: Re: [rt.cpan.org #18473] Unwarranted Presumption About $\
Date: Sat, 08 Apr 2006 10:44:30 +1000
To: bug-IO-Prompt@rt.cpan.org
From: Damian Conway <damian@conway.org>
Thanks for the report. I actually added the localization at the start of prompt() itself, to cover all possibilities. Damian


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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