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

Report information
The Basics

Nobody in particular
Rafael.Barros [...]

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

MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,HTML_MESSAGE,SPF_PASS
Content-Class: urn:content-classes:message
X-Virus-Checked: Checked by ClamAV on
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=SHA1; boundary="----=_NextPart_000_00DF_01C8C013.F00ACB50"
Received: from ( []) by (Postfix) with SMTP id 00F404D810F for <>; Tue, 27 May 2008 15:08:07 -0400 (EDT)
Received: (qmail 12595 invoked from network); 27 May 2008 19:08:06 -0000
Received: from ( by with QMQP; 27 May 2008 19:08:06 -0000
Received: from (HELO ( by (qpsmtpd/0.43rc1) with SMTP; Tue, 27 May 2008 12:08:02 -0700
Received: (qmail 1070 invoked from network); 27 May 2008 19:08:01 -0000
Received: from unknown (HELO ( by with SMTP; 27 May 2008 19:08:01 -0000
Subject: Possible Bug
Return-Path: <>
Thread-Index: AcjALRU7UJHl0HUVRgKwfiMYf2dV5Q==
Date: Tue, 27 May 2008 16:07:09 -0300
X-Spam-Level: *
X-MS-Has-Attach: yes
Thread-Topic: Possible Bug
Message-Id: <>
X-Mimeole: Produced By Microsoft Exchange V6.5
To: <>
From: "Rafael Barros" <>
Content-Length: 0
content-type: application/x-pkcs7-signature; name="smime.p7s"
content-disposition: attachment; filename="smime.p7s"
Content-Transfer-Encoding: base64
Content-Length: 3361

Message body not shown because it is not plain text.

Content-Type: multipart/alternative; boundary="----=_NextPart_001_00E0_01C8C013.F00ACB50"
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: us-ascii
Content-Length: 1296
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: us-ascii
Content-Length: 3595
I don't know if this is really a bug, but I have installed IO::Prompt on a Fedora 8 machine, and every call to prompt() with the -r option specified would trigger a warning:
Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.8.8/IO/ line 91.
the problem is shown when I try to execute the following code:
prompt( "Some message: ", -r => { "put something here>" => qr/\w+/ });
I looked into the code to see what was happenning, and found out that the problem was in this segment of code, in the file mentioned above:
    @data = map { $flags_alias{$_} || $_ } @data;
    for (my $i = 0 ; $i < @data ; $i++) {
        local *_ = \($data[$i]);
        if (ref eq 'HASH') {
            splice @data, $i + 1, 0, %$_;

the problem is that, when splice is called in -r, two arguments of @data are removed from the array. If this is the last argument, the array becomes empty and $_ gets the value undef in the next iteration. When the code does ref eq 'HASH' again, the warning is sent.
I think that only changing the if clause to be defined $_ and ref eq 'HASH' would resolve the problem.
Ah, my version of IO::Prompt is 0.99.4. My Fedora has the kernel and my perl is 5.8.8.
Rafael Adson Barbosa Barros

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

Please report any issues with to