Commit bf857760 authored by Salvatore Bonaccorso's avatar Salvatore Bonaccorso

Imported Upstream version 0.004013

parent 53511b12
......@@ -166,3 +166,11 @@ Revision history for IO-Prompter
* Handle terminal escape sequences (e.g. arrow keys) more gracefully
(Thanks, Lukasz!)
0.004013 Thu Jul 23 07:15:57 2015
* Added better default ERASE character for MSWin32 (thanks Dan!)
* Silenced warnings within test for valid input
(Thanks Joel!)
......@@ -4,7 +4,7 @@
"Damian Conway <DCONWAY@CPAN.org>"
],
"dynamic_config" : 1,
"generated_by" : "ExtUtils::MakeMaker version 7.02, CPAN::Meta::Converter version 2.142690",
"generated_by" : "ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 2.142690",
"license" : [
"perl_5"
],
......@@ -38,5 +38,5 @@
}
},
"release_status" : "stable",
"version" : "0.004012"
"version" : "0.004013"
}
......@@ -7,7 +7,7 @@ build_requires:
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 7.02, CPAN::Meta::Converter version 2.142690'
generated_by: 'ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 2.142690'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
......@@ -20,4 +20,4 @@ no_index:
requires:
Contextual::Return: '0'
Test::More: '0'
version: '0.004012'
version: '0.004013'
IO::Prompter version 0.004012
IO::Prompter version 0.004013
Prompt for, read, vet, chomp, and encapsulate input.
Like so:
......
......@@ -9,7 +9,7 @@ use Contextual::Return qw< PUREBOOL BOOL SCALAR METHOD VOID LIST RETOBJ >;
use Scalar::Util qw< openhandle looks_like_number >;
use Symbol qw< qualify_to_ref >;
our $VERSION = '0.004012';
our $VERSION = '0.004013';
my $fake_input; # Flag that we're faking input from the source
......@@ -938,7 +938,7 @@ sub _verify_input_constraints {
CONSTRAINT:
for my $msg (@constraints) {
my $constraint = $constraint_for{$msg};
next CONSTRAINT if eval { local $_ = $input; $input ~~ $constraint; };
next CONSTRAINT if eval { no warnings; local $_ = $input; $input ~~ $constraint; };
$failed = $msg =~ m{\A [[:upper:]] }xms ? "$msg "
: $msg =~ m{\A \W }xms ? $opt_ref->{-prompt}
. "$msg "
......@@ -1180,7 +1180,7 @@ sub _generate_unbuffered_reader_from {
$ctrl{EOF} //= "\4";
$ctrl{INTERRUPT} //= "\3";
$ctrl{ERASE} //= "\177";
$ctrl{ERASE} //= $^O eq 'MSWin32' ? "\10" : "0177";
my $ctrl = join '|', values %ctrl;
......@@ -1718,7 +1718,7 @@ IO::Prompter - Prompt for input, read it, clean it, return it.
=head1 VERSION
This document describes IO::Prompter version 0.004012
This document describes IO::Prompter version 0.004013
=head1 SYNOPSIS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment