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

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

People
Owner:
Nobody in particular
Requestors:
mlj [...] sabreit.co.uk
Cc:
AdminCc:

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



Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 01EFE4D8117 for <bug-IO-Prompt@rt.cpan.org>; Fri, 7 Aug 2009 09:20:17 -0400 (EDT)
Received: (qmail 12087 invoked by uid 103); 7 Aug 2009 13:20:17 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 7 Aug 2009 13:20:17 -0000
Received: from mtaout03-winn.ispmail.ntl.com (HELO mtaout03-winn.ispmail.ntl.com) (81.103.221.49) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Fri, 07 Aug 2009 06:20:09 -0700
Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090807131956.PWJQ5579.mtaout03-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com> for <bug-IO-Prompt@rt.cpan.org>; Fri, 7 Aug 2009 14:19:56 +0100
Received: from claymore.sabreit.co.uk ([80.6.43.6]) by aamtaout04-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090807131954.RKZU22934.aamtaout04-winn.ispmail.ntl.com@claymore.sabreit.co.uk> for <bug-IO-Prompt@rt.cpan.org>; Fri, 7 Aug 2009 14:19:54 +0100
Received: from claymore.sabreit.co.uk (claymore.sabreit.co.uk [192.168.1.2]) by claymore.sabreit.co.uk (8.12.8/8.12.8) with ESMTP id n77DJqAT006451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <bug-IO-Prompt@rt.cpan.org>; Fri, 7 Aug 2009 14:19:52 +0100
Delivered-To: cpan-bug+IO-Prompt@diesel.bestpractical.com
MIME-Version: 1.0
Subject: problem with $_ undefined when used in module
X-Spam-Status: No, hits=-0.0 required=8.0 tests=SPF_PASS
Return-Path: <mlj@sabreit.co.uk>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-IO-Prompt@rt.cpan.org
Date: Fri, 7 Aug 2009 14:19:52 +0100 (BST)
X-Spam-Level: *
X-Cloudmark-Analysis: v=1.0 c=1 a=jHtRb3z9hQ0A:10 a=evjD-pp_jH36FYGwFRoA:9 a=LCXWAGVYMwsM_xYlPw75ROr19OkA:4
content-type: TEXT/PLAIN; charset="utf-8"
Message-ID: <Pine.LNX.4.44.0908071352180.3714-100000@claymore.sabreit.co.uk>
To: bug-IO-Prompt@rt.cpan.org
From: Martin L Jones <mlj@sabreit.co.uk>
X-RT-Original-Encoding: US-ASCII
Content-Length: 659
To replicate the fault: ==== #!/usr/bin/perl -w use warnings; use strict; Demo::demo(); package Demo; use IO::Prompt; sub demo { my $password = prompt 'Password: ', -echo => '*'; print $password; } 1; ==== Error message is: Use of uninitialized value in pattern match (m//) at /usr/local/share/perl/5.8.8/IO/Prompt.pm line 91. Password: === Don't entirely understand the cause, but adding the line marked '++' below appears to be a workaround: for (my $i = 0 ; $i < @data ; $i++) { local *_ = \($data[$i]); ++ next if (not defined $_); if (ref eq 'HASH') { Thanks again for a very useful module! Martin.
MIME-Version: 1.0
In-Reply-To: <Pine.LNX.4.44.0908071352180.3714-100000@claymore.sabreit.co.uk>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <Pine.LNX.4.44.0908071352180.3714-100000@claymore.sabreit.co.uk>
Message-ID: <rt-3.6.HEAD-1109-1250689107-1518.48515-0-0@rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
From: richard.hodgson@gmail.com
X-RT-Original-Encoding: utf-8
Content-Length: 1205
Confirming this error too: use IO::Prompt; my $password = prompt("Password: ", -e => "*"); print qq{\n} . $password . qq{\n}; Creates the error: Use of uninitialized value $_ in pattern match (m//) at C:/Perl/site/lib/IO/Prompt.pm line 91. Don't really want to alter the source, seeing as I'm testing this for possible use in a system where the user will not be expected to patch their perl modules. On Fri Aug 07 09:20:35 2009, mlj@sabreit.co.uk wrote:
Show quoted text
> > To replicate the fault: > > ==== > #!/usr/bin/perl -w > use warnings; > use strict; > > Demo::demo(); > > package Demo; > use IO::Prompt; > > sub demo { > my $password = prompt 'Password: ', -echo => '*'; > print $password; > } > > 1; > ==== > > Error message is: > > Use of uninitialized value in pattern match (m//) at > /usr/local/share/perl/5.8.8/IO/Prompt.pm line 91. > Password: > > === > > Don't entirely understand the cause, but adding the line marked '++' > below appears to be a workaround: > > > for (my $i = 0 ; $i < @data ; $i++) { > local *_ = \($data[$i]); > ++ next if (not defined $_); > if (ref eq 'HASH') { > > > Thanks again for a very useful module! > > Martin. >
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=DK_SIGNED,SPF_PASS
In-Reply-To: <rt-3.6.HEAD-1109-1250689107-1518.48515-5-0@rt.cpan.org>
References: <RT-Ticket-48515@rt.cpan.org> <Pine.LNX.4.44.0908071352180.3714-100000@claymore.sabreit.co.uk> <rt-3.6.HEAD-1109-1250689107-1518.48515-5-0@rt.cpan.org>
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Message-ID: <832f158a0908190649p3200fec6ka0b295c53e744f5e@mail.gmail.com>
Content-Type: multipart/mixed; boundary=0016364c73bb6b607d04717ee7f4
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 6C13819B8338 for <bug-IO-Prompt@rt.cpan.org>; Wed, 19 Aug 2009 09:49:39 -0400 (EDT)
Received: (qmail 23641 invoked by uid 103); 19 Aug 2009 13:49:38 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 19 Aug 2009 13:49:38 -0000
Received: from mail-vw0-f199.google.com (HELO mail-vw0-f199.google.com) (209.85.212.199) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Wed, 19 Aug 2009 06:49:33 -0700
Received: by vws37 with SMTP id 37so3670835vws.27 for <bug-IO-Prompt@rt.cpan.org>; Wed, 19 Aug 2009 06:49:29 -0700 (PDT)
Received: by 10.220.44.146 with SMTP id a18mr8868510vcf.11.1250689769234; Wed, 19 Aug 2009 06:49:29 -0700 (PDT)
Delivered-To: cpan-bug+IO-Prompt@diesel.bestpractical.com
Subject: Re: [rt.cpan.org #48515] problem with $_ undefined when used in module
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; b=xz0TZkhoq3xPM8mkwdfMstCkLCmeDbGyDomVK1ptqskTv/cd2EaITpby9qIz1SteIO OsVvAZvKdiWoCTfXX7s93wyQWacqPCmY73cz17/Aojz2W2GectKTW5W78hQHIDZaZZvz fef2tlfhbYcVDNhXh8OWTg68ERAbmWHHJr8M4=
Return-Path: <thoughtstream@gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to :content-type; bh=fAeOMg+aQRc1t5cRoFL3fBkRxNnU0H/4d42Z2ykGtro=; b=yEk7Tqy+vRsS6Kqv//sKxQlwJ1RSCQU8DFAZrCVLirxm5rhT6wg++zqzuiWEhsfPZv 34G0mU02ZybAGVskRjC0D4/0ghIyyYmJiz1+HNiY+BPntXGAdQZrzDuwuIjqtntNazrs AkE7eLh33xditqgWuLgC6M5ZT/3Q3FvlhpVAU=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-IO-Prompt@rt.cpan.org
X-Google-Sender-Auth: e2f4aa178f78eb61
Date: Wed, 19 Aug 2009 15:49:09 +0200
Sender: thoughtstream@gmail.com
X-Spam-Level: *
To: bug-IO-Prompt@rt.cpan.org
From: Damian Conway <damian@conway.org>
RT-Message-ID: <rt-3.6.HEAD-1109-1250689789-752.48515-0-0@rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: utf-8
Content-Length: 403
Show quoted text
> Confirming this error too: > > use IO::Prompt; > my $password = prompt("Password: ", -e => "*"); > print qq{\n} . $password . qq{\n}; > > Creates the error: > Use of uninitialized value $_ in pattern match (m//) at > C:/Perl/site/lib/IO/Prompt.pm line 91.
Fixed for the next release. If you're interested, try this beta of that release to ensure I've correctly repaired the problem. Thanks, Damian
content-type: application/x-perl; name="Prompt.pm"
X-Attachment-ID: f_fyk4ek4f0
content-disposition: attachment; filename="Prompt.pm"
Content-Transfer-Encoding: base64
Content-Length: 28190

Message body is not shown because sender requested not to inline it.

MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-1109-1250689789-752.48515-0-0@rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <RT-Ticket-48515@rt.cpan.org> <Pine.LNX.4.44.0908071352180.3714-100000@claymore.sabreit.co.uk> <rt-3.6.HEAD-1109-1250689107-1518.48515-5-0@rt.cpan.org> <832f158a0908190649p3200fec6ka0b295c53e744f5e@mail.gmail.com> <rt-3.6.HEAD-1109-1250689789-752.48515-0-0@rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-10123-1263930444-887.48515-0-0@rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 702
On Wed Aug 19 09:49:49 2009, damian@conway.org wrote:
Show quoted text
> > Confirming this error too: > > > > use IO::Prompt; > > my $password = prompt("Password: ", -e => "*"); > > print qq{\n} . $password . qq{\n}; > > > > Creates the error: > > Use of uninitialized value $_ in pattern match (m//) at > > C:/Perl/site/lib/IO/Prompt.pm line 91.
> > Fixed for the next release. If you're interested, try this beta of > that release > to ensure I've correctly repaired the problem. > > Thanks, > > Damian
Hi, the attached file differs from the current version on CPAN (0.996) only by some versioning information. It does not fix this bug, although the patch posted in #48515 does fix the problem for v0.996. Leo
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS
In-Reply-To: <rt-3.8.HEAD-10123-1263930446-1020.48515-5-0@rt.cpan.org>
References: <RT-Ticket-48515@rt.cpan.org> <Pine.LNX.4.44.0908071352180.3714-100000@claymore.sabreit.co.uk> <rt-3.6.HEAD-1109-1250689107-1518.48515-5-0@rt.cpan.org> <832f158a0908190649p3200fec6ka0b295c53e744f5e@mail.gmail.com> <rt-3.6.HEAD-1109-1250689789-752.48515-5-0@rt.cpan.org> <rt-3.8.HEAD-10123-1263930446-1020.48515-5-0@rt.cpan.org>
Message-ID: <832f158a1001192007u405fabbs86fb0c5c86b77427@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 7134F4D8014 for <bug-IO-Prompt@rt.cpan.org>; Tue, 19 Jan 2010 23:07:35 -0500 (EST)
Received: (qmail 24979 invoked by uid 103); 20 Jan 2010 04:07:34 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 20 Jan 2010 04:07:34 -0000
Received: from qw-out-2122.google.com (HELO qw-out-2122.google.com) (74.125.92.25) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Tue, 19 Jan 2010 20:07:31 -0800
Received: by qw-out-2122.google.com with SMTP id 9so401462qwb.27 for <bug-IO-Prompt@rt.cpan.org>; Tue, 19 Jan 2010 20:07:28 -0800 (PST)
Received: by 10.220.123.91 with SMTP id o27mr2306206vcr.88.1263960448184; Tue, 19 Jan 2010 20:07:28 -0800 (PST)
Delivered-To: cpan-bug+IO-Prompt@diesel.bestpractical.com
Subject: Re: [rt.cpan.org #48515] problem with $_ undefined when used in module
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; b=IVDjvaiSydapsBfzYih6sv4NfZFU25YyiQ6m083HXzsmM8i9NVeWYmwp3OyWdBLZda 1vAUixvosOdmOOD/lgb5MsHQxL6RHBFzDz7nqbE1+R+KjGEm3i9ZDt1VY+ALT6J3+C1Q qHXxmsE/gGPIWMnsCW4JmJWWYPMnLG6sL/KCg=
Return-Path: <thoughtstream@gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to :content-type; bh=B7Ifkehmx+MeLu0TrCCfsqQKlD06FqBj0RJuyjKkzaY=; b=EjLOWZ1a/c6yuAE/QE7hmr+T1UUJnENESARzqLQCHz9OuxrubPSge5rZLpIeA1MbW5 ay434TkySu7ZrWYbNSumUVPNrXxDActGTJZDmYQ6DNBPmpIOiNSHhfCE8JxxJWXGdraQ LFCZOfl9drTCtahStzsHmTv51UDFXvSFWCw/A=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-IO-Prompt@rt.cpan.org
X-Google-Sender-Auth: ef9812e62c9857f5
Date: Wed, 20 Jan 2010 15:07:08 +1100
Sender: thoughtstream@gmail.com
X-Spam-Level: *
To: bug-IO-Prompt@rt.cpan.org
From: Damian Conway <damian@conway.org>
RT-Message-ID: <rt-3.8.HEAD-10118-1263960465-977.48515-0-0@rt.cpan.org>
Content-Length: 539
Leo,
Show quoted text
> Hi, the attached file differs from the current version on CPAN (0.996) > only by some versioning information. It does not fix this bug, although > the patch posted in #48515 does fix the problem for v0.996.
Okay. Something weird is going on. You're correct that the beta version I sent previously is now the version on CPAN. I updated it 10 days ago. Are you sure you're not still testing with version 0.99.4? Version 0.996 definitely fixes the bug and does not issue the 'undefined' warning...at least, not on my system. 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.