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

Report information
The Basics
Id:
42681
Status:
new
Priority:
Low/Low
Queue:

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

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



Subject: Fix for " Use of uninitialized value $_ in pattern match (m//)"
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1232645959-29719-476"
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 292
When pragma "warnings" and "-w" are enabled while calling propmpt() there are warnings like : Use of uninitialized value $_ in pattern match (m//) at .../lib/IO/Prompt.pm line 91. Run attached "test-IO-Prompt.pl" for demonstration of issue. Patch is attached in the file "patch-Prompt.pm".
Subject: patch-Prompt.pm
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1232645959-29719-475"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: application/octet-stream; name="patch-Prompt.pm"
Content-Disposition: inline; filename="patch-Prompt.pm"
Content-Transfer-Encoding: base64
Content-Length: 284
--- Prompt.pm +++ Prompt.pm @@ -88,6 +88,7 @@ @data = map { $flags_alias{$_} || $_ } @data; for (my $i = 0 ; $i < @data ; $i++) { local *_ = \($data[$i]); + next unless defined $_; if (ref eq 'HASH') { splice @data, $i + 1, 0, %$_; }
Subject: test-IO-Prompt.pl
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1232645853-29719-474"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: application/octet-stream; name="test-IO-Prompt.pl"
Content-Disposition: inline; filename="test-IO-Prompt.pl"
Content-Transfer-Encoding: base64
Content-Length: 119
#!/usr/bin/perl -Tw use strict; use warnings; use IO::Prompt; my $res = prompt( -prompt => "Enter something:");


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.