subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From james...@apache.org
Subject svn commit: r1729935 - /subversion/trunk/tools/dist/backport.pl
Date Fri, 12 Feb 2016 03:27:18 GMT
Author: jamessan
Date: Fri Feb 12 03:27:18 2016
New Revision: 1729935

URL: http://svn.apache.org/viewvc?rev=1729935&view=rev
Log:
* tools/dist/backport.pl:
  (): Remove isspace and isprint from POSIX import
  (prompt): Replace use of isspace and isprint with pattern matches.  These
    functions have been deprecated since Perl 5.20 and may be removed in 5.24.

Modified:
    subversion/trunk/tools/dist/backport.pl

Modified: subversion/trunk/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/backport.pl?rev=1729935&r1=1729934&r2=1729935&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Fri Feb 12 03:27:18 2016
@@ -41,7 +41,7 @@ use File::Copy qw/copy move/;
 use File::Temp qw/tempfile/;
 use IO::Select ();
 use IPC::Open3 qw/open3/;
-use POSIX qw/ctermid strftime isprint isspace/;
+use POSIX qw/ctermid strftime/;
 use Text::Wrap qw/wrap/;
 use Tie::File ();
 
@@ -311,11 +311,11 @@ sub prompt {
       ReadMode 'normal';
       die if $@ or not defined $answer;
       # Swallow terminal escape codes (e.g., arrow keys).
-      unless (isprint $answer or isspace $answer) {
+      unless ($answer =~ m/^(?:[[:print:]]+|\s+)$/) {
         $answer = (ReadKey -1) while defined $answer;
         # TODO: provide an indication that the keystroke was sensed and ignored.
       }
-    } until defined $answer and (isprint $answer or isspace $answer);
+    } until defined $answer and ($answer =~ m/^(?:[[:print:]]+|\s+)$/);
     print $answer;
     return $answer;
   };



Mime
View raw message