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

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

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

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



Subject: avoid IO::Prompt::ReturnVal?
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 438
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
X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=-1.0 required=8.0 tests=BAYES_00,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS
In-Reply-To: <rt-3.5.HEAD-24984-1143473847-447.18390-4-0@rt.cpan.org>
X-Accept-Language: en, en-us
Received-SPF: pass (x1.develooper.com: domain of thoughtstream@gmail.com designates 64.233.166.179 as permitted sender)
References: <RT-Ticket-18390@rt.cpan.org> <rt-3.5.HEAD-24984-1143473847-447.18390-4-0@rt.cpan.org>
X-Virus-Checked: Checked
Reply-To: damian@conway.org
Content-Type: multipart/mixed; boundary="------------010602050704030703070209"
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 6F7424D82BD for <cpan-bug+io-prompt@diesel.bestpractical.com>; Mon, 27 Mar 2006 19:43:23 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id BC3044D8265 for <bug-IO-Prompt@rt.cpan.org>; Mon, 27 Mar 2006 19:43:22 -0500 (EST)
Received: (qmail 23145 invoked by alias); 28 Mar 2006 00:43:17 -0000
Received: from pproxy.gmail.com (HELO pproxy.gmail.com) (64.233.166.179) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Mon, 27 Mar 2006 16:43:15 -0800
Received: by pproxy.gmail.com with SMTP id m51so251301pye for <bug-IO-Prompt@rt.cpan.org>; Mon, 27 Mar 2006 16:43:10 -0800 (PST)
Received: by 10.35.14.1 with SMTP id r1mr450562pyi; Mon, 27 Mar 2006 16:43:09 -0800 (PST)
Received: from ?10.10.105.8? ( [202.231.68.11]) by mx.gmail.com with ESMTP id h41sm1228583pyh.2006.03.27.16.43.07; Mon, 27 Mar 2006 16:43:09 -0800 (PST)
Delivered-To: cpan-bug+io-prompt@diesel.bestpractical.com
Subject: Re: [rt.cpan.org #18390] avoid IO::Prompt::ReturnVal?
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.8) Gecko/20050511
Domainkey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:user-agent:x-accept-language:mime-version:to:subject:references:in-reply-to:content-type:sender; b=NHr83vDoVC0o0w6Hm6dW7S1Ffi1RU7Q7xhViemSThGHrmYApq5xNxo1OrjUWncdjWksjuVOjlkAZsVL/hhgLb28CsUmdmePSjnLIT96iWTWKR3yMYeho/mFOHZbfxQJUgPqeRVNRqVyedRXsAUwyzPJbmHdjO1d24BAy4CbezzU=
Return-Path: <thoughtstream@gmail.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+io-prompt@diesel.bestpractical.com
Date: Tue, 28 Mar 2006 09:42:58 +0900
Sender: Damian Conway <thoughtstream@gmail.com>
Message-Id: <44288692.90008@conway.org>
To: bug-IO-Prompt@rt.cpan.org
From: Damian Conway <damian@conway.org>
RT-Message-ID: <rt-3.5.HEAD-25011-1143506607-1678.18390-0-0@rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: us-ascii
X-RT-Original-Encoding: utf-8
Content-Length: 524
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
content-type: application/text; name="Prompt.pm"; x-mac-creator="0"; x-mac-type="0"
content-disposition: inline; filename="Prompt.pm"
Content-Transfer-Encoding: base64
Content-Length: 27486

Message body is not shown because it is too large.



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.