summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalvatore Bonaccorso <carnil@debian.org>2015-07-23 19:55:08 +0200
committerSalvatore Bonaccorso <carnil@debian.org>2015-07-23 19:55:08 +0200
commitbf857760989701553afb5c450eced3f708a0ba78 (patch)
tree220836e06dddcc3d78a5e89c3a2a02770067e623
parent53511b12a15cc50e60a960f9a450316a72368228 (diff)
Imported Upstream version 0.004013
-rw-r--r--Changes8
-rw-r--r--META.json4
-rw-r--r--META.yml4
-rw-r--r--README2
-rw-r--r--lib/IO/Prompter.pm8
5 files changed, 17 insertions, 9 deletions
diff --git a/Changes b/Changes
index 34a1bd7..6618c0c 100644
--- a/Changes
+++ b/Changes
@@ -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!)
diff --git a/META.json b/META.json
index 3a74c81..a2b428b 100644
--- a/META.json
+++ b/META.json
@@ -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"
}
diff --git a/META.yml b/META.yml
index a37a222..8ef6a02 100644
--- a/META.yml
+++ b/META.yml
@@ -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'
diff --git a/README b/README
index f8db75b..4172d35 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-IO::Prompter version 0.004012
+IO::Prompter version 0.004013
Prompt for, read, vet, chomp, and encapsulate input.
Like so:
diff --git a/lib/IO/Prompter.pm b/lib/IO/Prompter.pm
index 96987fc..4626324 100644
--- a/lib/IO/Prompter.pm
+++ b/lib/IO/Prompter.pm
@@ -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