Skip Menu |

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

Report information
The Basics
Id: 18390
Status: open
Priority: 0/
Queue: IO-Prompt

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

Bug Information
Severity: Wishlist
Broken in: v0.99.4
Fixed in: (no value)



Subject: avoid IO::Prompt::ReturnVal?
Is IO::Prompt::ReturnVal really necessary? Can you please introduce an option to avoid it? Right now I have to force stringification, because I'm using the data with Storable (and thaw complains, because it "Cannot restore overloading on HASH(0x8773c90) (package IO::Prompt::ReturnVal) (even after a "require IO::Prompt::ReturnVal;") at blib/lib/Storable.pm (autospli t into blib/lib/auto/Storable/thaw.al) line 366"). Thanks, bye, Uwe
Subject: Re: [rt.cpan.org #18390] avoid IO::Prompt::ReturnVal?
Date: Tue, 28 Mar 2006 09:42:58 +0900
To: bug-IO-Prompt [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Uwe asked: Show quoted text
> Is IO::Prompt::ReturnVal really necessary?
Yes. It's necessary to allow return values to have correct boolean vs value semantics, as well as magically autosetting $_. Show quoted text
> Can you please introduce an option to avoid it?
Sure. The attached beta provides a -raw flag that causes prompt() to return the raw text that was typed in (as a string), rather than a RetVal object. Note that you lose all the clever context sensitivity (including autosetting $_) when this option is used. Hope this helps, Damian

Message body is not shown because it is too large.